js實現隔行變色
...
lt DOCTYPE html gt lt html lang en gt lt head gt lt meta charset UTF gt lt meta http equiv X UA Compatible content ie edge gt lt title gt 兩種方式讓css隔行變色js和css 屬性.box li:nth of type lt title gt lt style ...
2019-12-03 19:09 0 253 推薦指數:
...
用到的鼠標事件:(1)鼠標經過 onmouseover;(2)鼠標離開 onmouseout 核心思路:鼠標經過 tr 行的時候,當前行會改變背景顏色,鼠標離開的時候去掉背景顏色。 注意:第一行( ...
(1)用expression 鼠標滑過變色: <style type="text/css"><!-- table { background-color:#000000; cursor:hand; width:100%; }td {onmouseover: expression ...
效果圖 實現代碼: 通過css控制樣式,利用jquery的addClass方法實現 ...
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css ...
...
tr:nth-child(odd) { background-color: #ccc; } tr:nth-child(even) { background-color: ...