本頁面有圖片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