原文:WPF ListView控件设置奇偶行背景色交替变换以及ListViewItem鼠标悬停动画 利用WPF的ListView控件实现类似于Winform中DataGrid行背景色交替变换的效果,同时增加鼠标的悬停效果. 1.本文实现的效果如下: 2.所有的效果,我通过C#代码实现.代码如下: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Wi
;(function(window){ var tb = document.getElementById('tablelist'); function trfocus(){//为了兼容IE6在css中td不要设置背景颜色,否则会遮挡住tr背景颜色的变换.在标准浏览器中可以直接用样式控制鼠标滑过时,切换表格行背景色的效果,代码是: //.tablelist tr:hover td{background: #e2f3fe;color: #2d9ff1;} var e