指定方法 | セレクター名 | 点数 |
---|---|---|
style="" | HTML要素への直書き | 1000 |
#ID名 | 「id」セレクタ | 100 |
.クラス名 | 「class」セレクタ | 10 |
要素属性(例:「type="text"」) | 擬似クラス | 10 |
要素名:first-child | 擬似要素 | 1 |
要素名(例:div) | タイプセレクタ | 1 |
*(アスタリスク) | 全称セレクタ | 0 |
疑似クラス | 説明 |
---|---|
:active | |
:any-link | |
:blank | |
:checked | |
:current | |
:default | |
:defined | |
:dir() | |
:disabled | |
:drop | |
:empty | |
:enabled | |
:first | |
:first-child | |
:first-of-type | |
:fullscreen | |
:future | |
:focus | |
:focus-visible | |
:focus-within | |
:has() | |
:host | |
:host() | |
:host-context() | |
:hover | |
:indeterminate | |
:in-range | |
:invalid | |
:is() | |
:lang() | |
:last-child | |
:last-of-type | |
:left | |
:link | |
:local-link | |
:not() | |
:nth-child() | |
:nth-col() | |
:nth-last-child() | |
:nth-last-col() | |
:nth-last-of-type() | |
:nth-of-type() | |
:only-child | |
:only-of-type | |
:optional | |
:out-of-range | |
:past | |
:placeholder-shown | |
:read-only | |
:read-write | |
:required | |
:right | |
:root | |
:scope | |
:target | |
:target-within | |
:user-invalid | |
:valid | |
:visited | |
:where() |
疑似要素 | 説明 |
---|---|
::after (:after) | |
::backdrop | |
::before (:before) | |
::cue | |
::cue-region | |
::first-letter (:first-letter) | |
::first-line (:first-line) | |
::grammar-error | |
::marker | |
::part() | |
::placeholder | |
::selection | |
::slotted() | |
::spelling-error |