CSS3:first-child和first-of-type的区别
如下代码块是一个html结构,接下来将会使用first-child和first-of-type分别进行css操作,从而找出他们的区别。
<div id="example">
<p>1</p>
<div>2</div>
<div>3</div>
</div>
1、first-child
#example>div:first-child {
background-color:
原创
2020-08-23 22:16:56 ·
405 阅读 ·
0 评论