css选择器:first-of-type
来源:互联网 发布:淘宝和天猫哪个假货多 编辑:程序博客网 时间:2024/05/16 10:23
<div class="box1">box1 <span>span</span> <div class="box">box</div> <div class="big">big <p class="big">aaa</p> <p class="p">bbb</p> <p class="big">ccc</p> <p class="p">ddd</p> </div></div><style> /*只有<div class="box">box</div>被选中选择 选择div.box1下的div元素中的第一个div元素*/ div.box1 div:first-of-type{ color:red; } /*只有<p class="big">aaa</p>被选中 选择div.box1下的第一个具有big类的div元素,该元素必须是父级元素下的第一个子元素*/ div.box1 .big:first-of-type{ color:blue; }</style>
0 0
- css选择器:first-of-type
- first-of-type选择器
- CSS选择器 first-child 、first-of-type 和 nth-of-type()
- css选择器——:first/last-of-type
- 【CSS3】first-of-type选择器
- 【CSS3】---first-of-type选择器+nth-of-type(n)选择器
- css选择器中:first-child与:first-of-type的区别
- CSS选择器中first-child和first-of-type的区别
- css选择器中:first-child与:first-of-type的区别
- css选择器中:first-child与:first-of-type的区别
- 在css选择器中:first-child与:first-of-type的用法
- css伪类选择器之:first-child和:first-of-type
- css选择器中:first-child与:first-of-type的区别
- css选择器中:first-child与:first-of-type的区别///CSS3伪类nth-of-type(n)用法详解
- 理解Jquery的first-of-type选择器
- :first-of-type | CSS属性参考
- css选择器——:only-of-type
- first-child first-of-type last-child last-of-type 伪类选择器总结
- 夜神模拟器无法使用adb命令提示adb server version 31 doesn't match
- [kuangbin带你飞]专题十六 KMP & 扩展KMP & Manacher H POJ 2752
- java 运算符的总结
- LeetCode笔记:9. Palindrome Number
- 程序员的悲哀
- css选择器:first-of-type
- c++动态加载dll
- java新人
- First Blog
- linux下打印带颜色的字符
- php复习 第二天 流程控制
- 致雅嵌入式工作室——51单片机学习之(1)——AT89S51/52单片机使用ISP JTAG下载线下载程序的方法
- UICollectionView
- 用用几何画板演示赵爽弦图证明勾股定理的方法