demo_07选择器练习
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
body{
background-color: #bbc;
}
header{
width: 100%;
text-align: center;
height: 50px;
margin-top: 20px;
line-height: 50px;
font-family: "微软雅黑";
font-size: 25px;
color: #DDFFFF;
letter-spacing: 2px;
}
table{
margin: 100px auto;
}
table td{
width: 100px;
height: 30px;
text-align: center;
color: #333;
}
tr:first-child{
background-color: #ddd;
}
tr:nth-last-child(2){
background-color: #def;
}
tr:nth-child(2){
background-color: #fde;
}
tr:nth-child(3){
background-color: #dff;
}
tr:last-child{
background-color: #fbc;
}
td:nth-last-child(4){
background-color: #bcf;
}
tr:nth-child(2)>td:nth-child(2){
background-color: #dbf;
}
tr:nth-child(4) td:nth-child(3){
background-color: #bac;
}
td[style]{
background-color: #dac;
}
td[class~="name"]{
background-color: #efadcb;
}
td[class*="set"]{
background-color: #defacb;
}
td[class*="set"]+td+td{
background-color: #3d21bc;
}
</style>
</head>
<body>
<header>
CSS3选择器练习
</header>
<section>
<table cellpadding="0" cellspacing="3">
<tr>
<td>11</td>
<td class="name set">12</td>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
</tr>
<tr>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
<td class="name">26</td>
<td>27</td>
</tr>
<tr>
<td>31</td>
<td>32</td>
<td>33</td>
<td class="name">34</td>
<td>35</td>
<td>36</td>
<td>37</td>
</tr>
<tr>
<td>31</td>
<td>32</td>
<td>33</td>
<td>34</td>
<td>35</td>
<td>36</td>
<td style="">37</td>
</tr>
<tr>
<td>31</td>
<td>32</td>
<td>33</td>
<td>34</td>
<td>35</td>
<td>36</td>
<td>37</td>
</tr>
</table>
</section>
</body>
</html>
demo_07选择器练习的更多相关文章
- 前端极易被误导的css选择器权重计算及css内联样式的妙用技巧
记得大学时候,专业课的网页设计书籍里面讲过css选择器权重的计算:id是100,class是10,html标签是5等等,然后全部加起来的和进行比较... 我只想说:真是误人子弟,害人不浅! 最近,在前 ...
- jQuery的61种选择器
The Write Less , Do More ! jQuery选择器 1. #id : 根据给定的ID匹配一个元素 <p id="myId">这是第一个p标签< ...
- 05.LoT.UI 前后台通用框架分解系列之——漂亮的时间选择器
LOT.UI分解系列汇总:http://www.cnblogs.com/dunitian/p/4822808.html#lotui LoT.UI开源地址如下:https://github.com/du ...
- CSS 选择器及各样式引用方式
Css :层叠样式表 (Cascading Style Sheets),定义了如何显示HTML元素. 目录 1. 选择器的分类:介绍ID.class.元素名称.符合.层次.伪类.属性选择器. 2. 样 ...
- jQuery学习之路(1)-选择器
▓▓▓▓▓▓ 大致介绍 终于开始了我的jQuery学习之路!感觉不能再拖了,要边学习原生JavaScript边学习jQuery jQuery是什么? jQuery是一个快速.简洁的JavaScript ...
- 谈谈一些有趣的CSS题目(十)-- 结构性伪类选择器
开本系列,谈谈一些有趣的 CSS 题目,题目类型天马行空,想到什么说什么,不仅为了拓宽一下解决问题的思路,更涉及一些容易忽视的 CSS 细节. 解题不考虑兼容性,题目天马行空,想到什么说什么,如果解题 ...
- JQuery 选择器
选择器是JQuery的根基,在JQuery中,对事件的处理,遍历DOM和AJAX操作都依赖于选择器.如果能够熟练地使用选择器,不仅能简化代码,而且还可以事半功倍. JQuery选择器的优势 1.简洁的 ...
- jq选择器基础
Jquery $代表选择器 使用jq必须要导入jq文件 <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js&qu ...
- 微信小程序中利用时间选择器和js无计算实现定时器(将字符串或秒数转换成倒计时)
转载注明出处 改成了一个单独的js文件,并修改代码增加了通用性,点击这里查看 今天写小程序,有一个需求就是用户选择时间,然后我这边就要开始倒计时. 因为小程序的限制,所以直接选用时间选择器作为选择定时 ...
随机推荐
- Hibernate拦截器(Interceptor)与事件监听器(Listener)
拦截器(Intercept):与Struts2的拦截器机制基本一样,都是一个操作穿过一层层拦截器,每穿过一个拦截器就会触发相应拦截器的事件做预处理或善后处理. 监听器(Listener):其实功能与拦 ...
- Wbemtest查询
运行wbemtest,打开后连接命名空间,默认为“root\cimv2”,可以连接到”IIS管理命名空间(此为Windows Server 2008 R2)“ 查看该命名空间下所有可用的类:单击“枚举 ...
- vbs运行批处理
dim wshellset wshell=createobject("wscript.shell") wshell.run "cmd /c sc query Spoole ...
- Nessus漏洞扫描教程之配置Nessus
Nessus漏洞扫描教程之配置Nessus 配置Nessus 当安装成功Nessus工具后.就可以使用该工具实施漏洞扫描.为了使用户更好的使用该工具,将介绍一下该工具的相关设置.如服务的启动.软件更新 ...
- jfinal文件上传和form表单值为null的解决方法
今天使用jfinal做上传提交的时候,遇到一个问题:添加了上传功能,原来的form表单submit提交时所有值都为null了,研究了很长时间,终于发现 在jfinal上传时候,jsp加 enctype ...
- RHCA442学习笔记-Unit13网络性能调整
UNIT 13 Essential Network Tuning 网络性能调整 目标:1. 应用队列技术最大化网络吞吐量 2. 调整TCP和non-TCP网络soc ...
- 通用块层、IO调度层以及设备驱动层的数据结构
http://blog.chinaunix.net/uid-28897358-id-3775640.html
- 删除主目录下的.ssh目录下文件对boot2docker启动影响
现象: 1) boot2docker ssh需要输入密码 2) boot2docker start 或 up 需要输入密码 解决方法: 1)删除 /Users/sunzhaoyu/.boot2dock ...
- eclipse引入jar类包的源代码
为了方便查看源代码,有时候需要对jar类包,引入源代码. 下载源代码 源代码是zip或者rar的压缩包 引入到项目中
- 【转】性能测试设计和LR原理的探讨
做了4个迭代的性能测试, 在没有需求的情况下步步艰辛,把代码和框架独立开发从0到一万多行代码的测试工具(脚本),作为性能测试工具佼佼者Lr,我时而拿他作参考,山寨了它很多 东西,同时带有很多疑问对它实 ...