核心提示:伪类before和after .one {font-size: 50px;color: red;}.one::before {/*content必须填写,有没有值无所谓*/content: ;colo...
伪类before和after
.one { font-size: 50px; color: red; } .one::before { /*content必须填写,有没有值无所谓*/ content: ""; color: green; } .one::after{ content: "after"; color: purple; }
伪类
清除浮动
.clearfix::before, .clearfix::after { content: ""; clear: both; display: block; }