本页面有图片http://www.robertsroofing.com/services-view/leak-repair/特别是照片上方的橙色水滴图标。我想隐藏这(显示:无),但似乎无法通过CSS目标。所以我也尝试在页面底部添加一些JavaScript,但是这也不起作用。也许它没有针对性,但我觉得我尝试了一切。如何覆盖显然由javascript设置的内联样式?
<article id="post-1975" class="post__holder post-1975 services type-services status-publish has-post-thumbnail hentry">
<figure class="featured-thumbnail thumbnail large"><img src="http://www.robertsroofing.com/wp-content/uploads/2014/11/icon-leak-tile.png" alt="Reliable Commercial Roof Leak Repair" style="display: inline;"></figure>
</article>
<script>
$(document).ready(function(){
$('.type-services .thumbnail img').attr('style','display: none');
})
</script>
因为这个模板是与其他内容共享的,所以我需要专门定位父类型服务类。我只需要使用.type-services类时隐藏的图像。
请在你的问题,而不是链接到网页上的相关标记 - 参见[东西在我的网站或项目不工作。我可以只是粘贴一个链接?](http://meta.stackoverflow.com/questions/254428/something-in-my-web-site-or-project-doesnt-work-can-i-just-paste -a-link-to-it) –
您的选择器中有错字。不知道这是你的问题。 'thumnail' – sma
你已经使用'.thumnail'丢失'b' – McNab