【发布时间】:2018-08-07 14:31:06
【问题描述】:
我正在尝试以父框元素为目标来更改 :after Pseudo 元素中的图标。当我将 & 符号放在类之后,它会跳出: .box-example-default #pageContainer .box .box-header 这不是你应该如何使用它吗?任何建议
<div id="pageContainer">
<div class="box box-example box-example-default">
<div class="header">
<h1>Title<h1>
</div>
</div>
<div class="box box-example box-example-simple">
<div class="header">
<h1><h1>
</div>
</div>
</div>
.box {
.header{
&:after{
position: absolute;
right:0;
bottom:-63%;
content: '\f0ce';
display:block;
font-family: "FontAwesome";
.box-example-simple &{
content: '\f0ce';
}
}
}
【问题讨论】:
标签: sass