我在使用 CSS:first-child
和:last-child
.
我需要在第一个标签之间添加一些空格,<a>
我只需要 margin-bottom:5px 和最后一个标签 0px。
这是我的代码..我在这里做错了什么?还有其他选择吗?谢谢
.addthis_toolbox.atfixed
{
border: 1px solid #eee;
padding: 5px;
width: 32px;
}
.addthis_toolbox:first-child
{
margin-bottom:5px;
}
.addthis_toolbox:last-child
{
margin-bottom:0px;
}
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_32x32_style atfixed">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4e55018a5d405a71"></script>
<!-- AddThis Button END -->