伪元素
1、对于伪元素before/after来说,必须加content属性,不然不会出现效果
2、伪元素为行内元素,所以必须设置display:block才可以对其设置宽高
div:after{ content:"你好"; width:20px; height:20px; background-color:rgb(255, 0, 0); }
div:after{ content:"你好"; width:20px; height:20px; background-color:rgb(255, 0, 0); }