次の HTML + CSS ( http://jsfiddle.net/Gb3dh/1/ ) の場合:
<input class="a" placeholder="here"/>
<input class="b" role="x" placeholder="there"/>
...
.a, .b {
font-style: italic;
}
[placeholder] input[role="x"] {
font-style=normal;
}
「class=b」入力の「font-style」が斜体なのはなぜですか? 2 番目の CSS セレクター (プレースホルダー タイトルがあり、入力の "title" 属性が "x" であるアイテムを取得する) が有効であると予想していました。