Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何按照 Sass 或 SCSS 的语法使用 :before 和 :after 伪元素选择器?像这样:
p margin: 2em auto > a color: red :before content: "" :after content: "* * *"
当然,上述失败。
使用 & 指定父选择器。
SCSS 语法:
p { margin: 2em auto; > a { color: red; } &:before { content: ""; } &:after { content: "* * *"; } }