2017年10月15日

子代选择器

摘要: 以多个p标签为例: 当需要选择奇数p标签,将其中的内容变成红色: 方式一: p:nth-child(odd){ color:red; } 方式二: p:nth-of-type(2n+1){//n从0开始的 color:red; } 方式三: p:nth-of-type(odd){//n从0开始的 c 阅读全文

posted @ 2017-10-15 10:13 comeOngo 阅读(454) 评论(0) 推荐(0)

css3定位理解

摘要: 定位的属性: 1.position:static 静态定位 定位的默认属性 2.position:relative 相对定位 要占据位置,根据自己的本来位置进行相应的移动,也就是说以自己为起点。 3.position:absolute 绝对定位 脱离文档流, 不占据位置,以离他最近的的非静态定位为起 阅读全文

posted @ 2017-10-15 09:59 comeOngo 阅读(124) 评论(0) 推荐(0)

导航