我一直试图从使用Firefox时出现的Yelp网站徽章中删除底部边框(最清楚)。
<style> div.yelp-biz-badge-script-plain-j3i0uapgqgIpKNS9KA2v4w a {
border: none;
}
</style>
&#13;
<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>
&#13;
有什么建议吗?
答案 0 :(得分:1)
当您了解实际输出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。