|
<style> li{background-color:expression(var ulo = this.parentNode;);clg:expression(onmouseover=function(){this.style.backgroundColor=(this.style.backgroundColor!='gray'?'gray':((this.rowIndex%2==0)?"blue":"red"))},onmouseout=function(){this.style.backgroundColor=(this.style.backgroundColor!='gray'?'gray':((this.rowIndex%2==0)?"blue":"red"))})} |
css里写javascript
CSS动态效果实现
本文介绍了一种使用CSS表达式来为表格行和列表项添加动态背景颜色变化的方法,并实现了鼠标悬停时背景色的变化效果。

被折叠的 条评论
为什么被折叠?



