我试图与fontawesome图标我的列表中的项目是这样的:与fontawesome图标缩进列表项
但此刻,他们是这样的:
这里我的HTML:
<section id="black-studio-tinymce-6" class="widget widget_black_studio_tinymce">
<h2 class="widget-title">Contact Us</h2>
<div class="textwidget">
<ul>
<li>021 552 1187</li>
<li>[email protected]</li>
<li>Unit S19 Spearhead Business Park<br>
cnr Montague Drive & Freedom Way<br>
Montagu Gardens<br>
Cape Town, South Africa</li>
</ul>
</div>
</section>
这里我的造型:
section#black-studio-tinymce-6 div.textwidget ul {
list-style: none;
padding-left: 0;
margin: 0;
li {
&:first-child:before {
@extend .font-awesome-footer;
content: '\f095';
}
&:nth-child(2):before {
@extend .font-awesome-footer;
content: '\f003';
}
&:last-child:before {
@extend .font-awesome-footer;
content: '\f041';
}
}
}
如何缩进fontawesome链接的图片显示后的内容? 希望你能帮上忙。
组你'李:之前'并入一个并扩展'.font-awesome-footer'以节省空间,我认为你应该考虑只使用'nnth-child'来获得更一致的代码 –