菜鸟速查:伪元素选择器
- 注意是行内元素!
- cotent必须要有!
- 权重与标签选择器一样,为1
实例
在每个 <p>之后插入的内容和样式:
p:after
{
content:"- Remember this";
background-color:yellow;
color:red;
font-weight:bold;
}
实例
在每个 <p>之后插入的内容和样式:
p:after
{
content:"- Remember this";
background-color:yellow;
color:red;
font-weight:bold;
}