簡單的css js控制table隔行變色
(1)用expression 鼠標滑過變色: <style type="text/css"><!-- table { background-color:#000000; cursor:hand; width:100%; }td {onmouseover: expression ...
(1)用expression 鼠標滑過變色: <style type="text/css"><!-- table { background-color:#000000; cursor:hand; width:100%; }td {onmouseover: expression ...
tr:nth-child(odd) { background-color: #ccc; } tr:nth-child(even) { background-color: ...
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>js控制隔行變色</title> </head> < ...
...
...
; <title>兩種方式讓css隔行變色js和css3屬性.box li:nth-of-t ...
用到的鼠標事件:(1)鼠標經過 onmouseover;(2)鼠標離開 onmouseout 核心思路:鼠標經過 tr 行的時候,當前行會改變背景顏色,鼠標離開的時候去掉背景顏色。 注意:第一行( ...
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>css控制表格隔行變色</title> <style type ...