您当前位置: 首页 »

css选择器

标签归档: css选择器

感悟:少用css子元素选择器

少用css元素选择器:”>”,为啥?因为ie6不兼容。。。 当然可以引用一些js来解决如: <!–[if lte IE 6]> <script type=”text/javascript” src=”./views/defa …

read more

css3伪类选择器选择偶数行

通过css3伪类选择器: :nth-child() 可以选择表格或li等有规律元素的偶数行。 css3选择偶数行代码为: table tr:nth-child(2n){ background-color:#eee} 同理,奇数行只要把2n改成2n+1即可。 css3选择奇数行代码为: table tr:nth-chil …

read more