div中的最后一个孩子不起作用

学习

我并使用addthis share插件并将背景颜色更改为黄色,并且还添加了bottom-border: of 1px,我想使用以下css从最后一个a中删除底部边框,该边框对我不起作用

的CSS

div#at4-share a:last-child
{
  border-bottom: 0px solid #1f1f1f; 
}

的HTML

<div id="at4-share" class="addthis_32x32_style atss atss-left addthis-animated slideInLeft at4-show">
  <a class="at4-share-btn at-svc-facebook" href="#">
    <span class=" at4-icon aticon-facebook" title="Facebook">Facebook</span>
  </a>
  <a class="at4-share-btn at-svc-twitter" href="#">
    <span class=" at4-icon aticon-twitter" title="Twitter">Twitter</span>
  </a>
  <a class="at4-share-btn at-svc-pinterest_share" href="#">
    <span class=" at4-icon aticon-pinterest_share" title="Pinterest">Pinterest</span>
  </a>
  <a class="at4-share-btn at-svc-google_plusone_share" href="#">
    <span class=" at4-icon aticon-google_plusone_share" title="Google+">Google+</span>
  </a>
  <a class="at4-share-btn at-svc-compact" href="#">
    <span class=" at4-icon aticon-compact" title="More">More</span>
  </a>
  <div id="at4-scc" class="at-share-close-control ats-transparent at4-show at4-hide-content" title="Hide">
    <div class="at4-arrow at-left">Hide</div>
  </div>
</div>

我试过了

div#at4-share a:last-of-type
{
  border-bottom: 0px solid #1f1f1f; 
}

所以我不确定什么是错的

科迪格登

正确的选择器是:last-of-type

div#at4-share > a:last-of-type
{
  border-bottom:none; /* To remove the bottom border. */
}

小提琴

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

第一个孩子最后一个孩子Dom遍历不起作用

:ng-repeat中的最后一个孩子不起作用

最后一个孩子不上课。最后一个类型也不起作用

删除边框,最后一个和第N个孩子不起作用

jQuery当第二个孩子是最后一个孩子时,最后一个孩子不起作用

到最后一个孩子的边框不起作用。为什么?

导航菜单不起作用的最后一个孩子想要取出内容:“-”

DIV上的第一个孩子选择不起作用

CSS选择器不是最后一个孩子不起作用(需要纯CSS解决方案)

为什么克隆最后一个元素在jQuery中不起作用?

用逗号打印偶数(C#中的最后一个除外)不起作用

带有锚标记的最后一个类型在CSS中不起作用

悬停时更改div中的img(最后一个/第一个孩子)

定位带有第一个孩子的引导行不起作用

:第一个孩子选择器不起作用?

CSS选择器第一个孩子不起作用

为什么将\ b作为回显中的最后一个字符时不起作用?

比较字符串的最后一个字符在 Android Studio 中不起作用

如何删除最后一个孩子div的边框权?

ReactJS 列表中的每个孩子都应该有一个唯一的“键”道具不起作用

如何在div父母中获得最后一个孩子?

最后一个孩子/最后一个类型不适用于 div

滚动textview的特定行到顶部对于最后一个全屏不起作用

css3的最后一个子句语法不起作用

:最后一个伪类与属性选择器混合不起作用

查找公式以查找值的最后一个实例不起作用

如果last li是链接,则最后一个选择器不起作用

如果我要拆分最后一个单词,则拆分句子不起作用

如果最后一个查询有评论,我的查询将不起作用。