我想更改一个li图标,但此尝试不起作用。
.ul_settlement{
margin-left: 20px;
.li_settlement{
padding-top: 15px;
font-family: $footer-mid-text-font-family;
font-size: $footer-mid-text-font-size;
&::before {
content: "\f054"; /* FontAwesome Unicode */
font-family: 'Font Awesome 5 Free';
display: inline-block;
margin-left: -1.3em; /* same as padding-left set on li */
width: 1.3em; /* same as padding-left set on li */
font-weight: 900;
}
}
}
<ul class="col-2 ul_settlement">
<h1 class="pack_channel_title">Customer support</h1>
<li class="li_settlement"> <a href="#">Shipping</a> </li>
<li class="li_settlement"><a href="#">General sales terms and conditions</a></li>
<li class="li_settlement"><a href="#">How to send order</a></li>
<li class="li_settlement"><a href="#">About pricing</a></li>
<li class="li_settlement"><a href="#">How to request free sample</a></li>
</ul>
客户支持 运输 一般销售条款和条件 如何发送订单 关于定价 如何索取免费样品
答案 0 :(得分:0)
您的语法错误:
这将起作用:
.ul_settlement {
margin-left: 20px;
}
.ul_settlement .li_settlement {
padding-top: 15px;
font-family: $footer-mid-text-font-family;
font-size: $footer-mid-text-font-size;
}
.ul_settlement .li_settlement::before {
content: "\f054"; /* FontAwesome Unicode */
font-family: 'Font Awesome 5 Free';
display: inline-block;
margin-left: -1.3em; /* same as padding-left set on li */
width: 1.3em; /* same as padding-left set on li */
font-weight: 900;
}
否则,您将需要像sass或更少的css预处理器。