table:
.myTable tr:nth-child(even){ //偶数行
background:#fff;
}
.myTable tr:nth-child(odd){ //奇数行
background:#f5f2eb;
}

ul列表:

#Ulist li:nth-of-type(odd){ margin-left: 20px;}奇数行

#Ulist li:nth-of-type(even){margin-left: 10px;}偶数行

CSS3设置Table奇数行和偶数行样式的更多相关文章

  1. css 设置奇数行偶数行样式

    .list ul li:nth-child(even){ ...}    //li的偶数行样式 .list ul li:nth-child(odd){ ...}    //li的奇数行样式 .list ...

  2. CSS中如何选择ul下li的奇数、偶数行

    <style> #Ulist li:nth-of-type(odd){ margin-left: 20px;}奇数行 #Ulist li:nth-of-type(even){margin- ...

  3. css为tbody或者li奇数偶数行样式

    <style> table tbody tr:nth-child(odd){ background:#fff; } table tbody tr:nth-child(even){ back ...

  4. html的table列表根据奇数还是偶数行显示不同颜色

    <tr <s:if test="#sts.even"> class="table_1" onMouseOut="this.class ...

  5. CSS3 设置 Table 隔行变色

    table tr:nth-child(odd){background:#F4F4F4;} table td:nth-child(even){color:#C00;}

  6. devexpress表格控件gridcontrol设置隔行变色、焦点行颜色、设置(改变)显示值、固定列不移动(附源码)

    介绍一些常用的gridcontrol设置. 1.设置隔行变色.首先设置显示隔行变色,步骤:OptionsView-->EnableAppearanceEvenRow-->true和Opti ...

  7. CSS3:nth-child()伪类选择器,Table表格奇偶数行定义样式

    转自爱设计 原文链接http://www.dangshopex.com/jishufenxiang/WEBkaifajishu/8653.html CSS3的强大,让人惊叹,人们在惊喜之余,又不得不为 ...

  8. css给奇数行或偶数行添加指定样式

    odd表示奇数行,even表示偶数行; tr:nth-child(odd); .table-striped > tbody > tr:nth-child(odd) { background ...

  9. linux命令(39):shell 打印偶数行,奇数行 ,行号

    awk 命令: 1. 打印行号和内容: awk '{print NR":"$0}' 2. 输出:偶数行和奇数行到文件 awk '{print $0.txt > NR%2.tx ...

随机推荐

  1. RandomForest in Spark MLLib

    决策树类模型 ml中的classification和regression主要基于以下几类: classification:决策树及其相关的集成算法,Logistics回归,多层感知模型: regres ...

  2. LeetCode149:Max Points on a Line

    题目: Given n points on a 2D plane, find the maximum number of points that lie on the same straight li ...

  3. abp + angular $http + webapi 服务

    什么是angular $http服务 http是angularjs的一个核心服务,用于读取远程服务器的数据,也就是封装了浏览器原生的xhtmlrequest对象,可以直接同外部进行通信. 怎样使用an ...

  4. ASP.NET在请求中检测到包含潜在危险的数据,因为它可能包括 HTML标记或脚本

    背景:程序迁移到新的服务器上,在程序进行修改操作时,提示包含危险数据.然而在旧服务器上却没有问题,我猜想的可能是,新服务器IIS安装的ASP.NET版本框架高于以前的IIS上的版本框架,导致web.c ...

  5. Angular6 学习笔记——指令

    angular6.x系列的学习笔记记录,仍在不断完善中,学习地址: https://www.angular.cn/guide/template-syntax http://www.ngfans.net ...

  6. iis部署 .net core webapi

    iis部署 .net core webapi 1.修改应用程序池: IIS 发布站点,这里就不介绍 IIS 安装等.这里要修改的是应用程序池,选择“无托管代码”: 2.下载安装.net core托管捆 ...

  7. java模板

    public class max { public static void main(String[]args){ """ /* xxx */ ""& ...

  8. Linux openvswitch 性能调优-flow-eviction-threshold

    原文:https://www.cnblogs.com/scottieyuyang/p/5683656.html Increasing the flow-eviction threshold The t ...

  9. Mac OS 10.12 - 解决“bad interpreter: No such file or directory”问题!

    在Mac OS10.12里面执行shell脚本时候,无法执行,错误提示:“bad interpreter: No such file or directory”,经过上网搜索,最终解决了,解决方法,首 ...

  10. python学习笔记6-集合

    # 集合是无序且不可重复的元素的集合 a = set([1,3,1,3,3,2,2,5]) a # {1, 2, 3, 5} b = set(range(2,5)) b # {2, 3, 4} # 1 ...