[quote=引用 6 楼 lin_xiongg 的回复:] [quote=引用 4 楼 microlab2009 的回复:] [quote=引用 2 楼 lin_xiongg 的回复:] [quote=引用 1 楼 microlab2009 的回复:] css content 属性与 :before 及 :after 伪元素配合使用,来插入生成内容。
[quote=引用 1 楼 microlab2009 的回复:] css content 属性与 :before 及 :after 伪元素配合使用,来插入生成内容。
css content 属性与 :before 及 :after 伪元素配合使用,来插入生成内容。
[quote=引用 4 楼 microlab2009 的回复:] [quote=引用 2 楼 lin_xiongg 的回复:] [quote=引用 1 楼 microlab2009 的回复:] css content 属性与 :before 及 :after 伪元素配合使用,来插入生成内容。
[quote=引用 2 楼 lin_xiongg 的回复:] [quote=引用 1 楼 microlab2009 的回复:] css content 属性与 :before 及 :after 伪元素配合使用,来插入生成内容。
这明显是用来清除浮动的代码 完美的清除浮动的解决方案就是伪类 + 触发IE下的私有属性 hasLayout来解决 .cf:after{display:block;content:'';clear:both;} .cf{zoom:1} 这种方法的前身就是利用空标签来清除浮动,只不过由于空标签清除浮动在结构语义上不太符合规范(凭空多出空标签),所以配合伪类来实现如此效果
61,115
社区成员
60,728
社区内容
加载中
试试用AI创作助手写篇文章吧