如何使用遵循Sass或SCSS语法的:before和:after伪元素 Select 器?这样地:
p
margin: 2em auto
> a
color: red
:before
content: ""
:after
content: "* * *"
当然,上述方法都失败了.
如何使用遵循Sass或SCSS语法的:before和:after伪元素 Select 器?这样地:
p
margin: 2em auto
> a
color: red
:before
content: ""
:after
content: "* * *"
当然,上述方法都失败了.
Use ampersand to specify the parent selector
SCSS语法:
p {
margin: 2em auto;
> a {
color: red;
}
&:before {
content: "";
}
&:after {
content: "* * *";
}
}