Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Web サイトのすべての画像 (タグを使用して表示) でdisplay:noneプロパティを使用したいと考えています。それを行うことができるCSSセレクターはありますか? それともjQueryがこれを行うための最良の方法ですか?.gif<img>
display:none
.gif
<img>
これは機能しませんが、次のようなものを探しています。
img[gif] { display:none; }
簡単な質問だと思います。Google では結果が得られませんでした。
できるよ:
img[src$=".gif"] { display: none; }
これは、すべての要素srcの「.gif」の属性の末尾を調べます。<img>
src