English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
attribute名を持つ属性を持つ要素を示します。
target属性を持つすべての<a>要素を選択する:
!DOCTYPE html> <html> <title>基礎教程網(oldtoolbag.com)</title> <head> <style> a[target] { background-color:blue; color:white; } </style> </head> <body> <p>target属性を持つリンクは青色の背景で表示されます:</p> <a href="//ja.oldtoolbag.com">oldtoolbag.com</a> <a href="//www.baidu.com" target="_blank">baidu.com</a> <a href="//www.pcjson.com" target="_top">pcjson.com</a> <p><b>注意</b> [i]attribute[i]を[<i> attribute </i>] IEで8及び以前のバージョンで実行するには、DOCTYPEを宣言する必要があります。</ p> </body> </html>試してみる ‹/›
すべての主要ブラウザが [attribute] 選択子。
IEFirefoxOperaChromeSafari
すべての主要ブラウザが [attribute]選択子。
注意: [attribute] IEで8中で実行するには、宣言する必要があります <!DOCTYPE> .
CSS 教程: CSS 属性選択子/a>
完全なCSS選択子リファレンスマニュアル