【问题标题】:How do you change colors of something when you move your cursor to it?当你将光标移到某物上时,你如何改变它的颜色? 【发布时间】:2011-12-15 10:43:38 【问题描述】: 如果你想改变按钮的颜色,你可以使用 onMouseOver 来改变颜色。 但是像表格这样的标签呢? 【问题讨论】: 标签: button colors onmouseover 【解决方案1】: 这可能有效: 为您的表格定义 css 类,例如 tableClass 现在定义tableClass:hover css,它将在鼠标悬停时起作用。 Here is the fiddle 【讨论】: 好!桌子通常是个笨蛋:)