如何遵循Sass或SCSS的语法使用:before和:after伪元素选择器?如下所示:
p
margin: 2em auto
> a
color: red
:before
content: ""
:after
content: "* * *"
当然,上面的方法失败了。
发布于 2012-05-25 16:06:37
Use ampersand to specify the parent selector。
SCSS语法:
p {
margin: 2em auto;
> a {
color: red;
}
&:before {
content: "";
}
&:after {
content: "* * *";
}
}
https://stackoverflow.com/questions/10750563
复制相似问题