Yelp网站徽章移除底部边框

Yelp网站徽章移除底部边框

我一直在尝试从使用Firefox时(最明显)出现的Yelp网站徽章移除底部边框。


<style> div.yelp-biz-badge-script-plain-j3i0uapgqgIpKNS9KA2v4w a {
  border: none;
}
</style>

<div align=center>
  <div id="yelp-biz-badge-plain-j3i0uapgqgIpKNS9KA2v4w"><a href="http://www.yelp.com/biz/weyhrauch-law-group-llp-richland">Check out Weyhrauch Law Group, LLP on Yelp</a>
  </div>
  <script type="text/javascript">
    (function(d, t) {
      var g = d.createElement(t);
      var s = d.getElementsByTagName(t)[0];
      g.id = "yelp-biz-badge-script-plain-j3i0uapgqgIpKNS9KA2v4w";
      g.src = "//dyn.yelpcdn.com/biz_badge_js/en_US/plain/j3i0uapgqgIpKNS9KA2v4w.js";
      s.parentNode.insertBefore(g, s);
    }(document, 'script'));
  </script>
</div>





有什么建议么?

最佳答案

当您了解实际的输出HTML时,这会容易一些

<div id="yelp-biz-badge-plain-j3i0uapgqgIpKNS9KA2v4w">

<a href="http://www.yelp.com/biz/weyhrauch-law-group-llp-kennewick-2">

<img alt="Weyhrauch Law Group, LLP" src="https://dyn.yelpcdn.com/extimg/genericYelpBizButton.png" height="33" width="88">

</a>

</div>


锚链接具有此CSS

a {
  color: #003f72;
  border-bottom: 1px dotted #003f72; /* did you want this? */
  text-decoration: none;
}


..这是图像



所以这

#yelp-biz-badge-plain-j3i0uapgqgIpKNS9KA2v4w a {
border:none;
}


应该做到的

很简单,根据您编辑的问题,您使用的是类选择器而不是ID。

10-06 00:33