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. 破解Oracle ERP密码

    前提:你有apps的数据库账户,想知道某个用户的密码,因为fnd_user中的密码为加密的,所以无法看懂,你可以尝试用下边的方式来查看用户密码. SQL> desc fnd_user; Name ...

  2. [翻译]NUnit---Sequential and SetCulture and SetUICulture Attributes(十八)

    Sequential特性用于在测试用例上指定NUnit通过为测试提供的参数选择单一值生产测试用例,并且不会生产额外的组合. Note:如果参数数据由多个特性提供,那么NUnit使用数据项的顺序是随机的 ...

  3. javascript 对象克隆

    浅克隆 先看代码: /** * 浅克隆 克隆传入对象,只克隆一层 * @param {any} source */ function shallowClone(source) { var tiaget ...

  4. hdu A Magic Lamp

    http://acm.hdu.edu.cn/showproblem.php?pid=3183 A Magic Lamp Time Limit: 2000/1000 MS (Java/Others)   ...

  5. Netty 源码中对 Redis 协议的实现

    原文地址: haifeiWu的博客 博客地址:www.hchstudio.cn 欢迎转载,转载请注明作者及出处,谢谢! 近期一直在做网络协议相关的工作,所以博客也就与之相关的比较多,今天楼主结合 Re ...

  6. SqlAlchemy操作(二)

    SQLALchemy初始化链接数据库 1. 数据库配置. https://www.cnblogs.com/mengbin0546/p/10124560.html 2.  python端操作. 一.  ...

  7. OpenSL的代码编写

    #include <jni.h>#include <string>#include <SLES/OpenSLES.h>#include <SLES/OpenS ...

  8. (转)为什么要重写 hashcode 和 equals 方法?

    作者丨hsm_computer cnblogs.com/JavaArchitect/p/10474448.html 我在面试Java初级开发的时候,经常会问:你有没有重写过hashcode方法?不少候 ...

  9. jzoj5875

    這玩意嚴格意義上算是水法(因為可能會被卡) 題目中,如果按照一般的bfs來搜索,那麼有平方級邊,會tle 如果按照補邊的線性來搜索,那麼時間複雜度變為min(k*k,m)*n,視n,m同階,則時間複雜 ...

  10. AndroidManifest.xml文件安全探索

    本文作者:i春秋签约作家——icq8756c1a2 最近在做一些apk的安全检测,对AndroidManifest.xml文件进行了研究和探讨,介绍AndroidManifest.xml文件的作用和架 ...