我想在h2之前和之后放置彩色圆点.
这是我的CSS;
h2:after { width:10px; height:10px; border-radius:50%; background: #b83b3b; } h2:after { width:10px; height:10px; border-radius:50%; background: #b83b3b; }
但没有点出现.
任何线索?
谢谢!
Jaeeun
指定content
属性的值,然后添加display:inline-block
jsFiddle例子
h2:after, h2:before { content:"\A"; width:10px; height:10px; border-radius:50%; background: #b83b3b; display:inline-block; }