[attribute] selector
[attribute="value"] selector
[attribute~="value"] selector
[attribute|="value"] selector
[attribute^="value"] selector
[attribute$="value"] selector
[attribute*="value"] selector
a[target] { ... }
input[type="text"] { ... }
div[style*="display: none"] { ... }
div[style*="height: 40px"] { ... }
- ':not()' selector와 결합
div:not([style*="display: block"]) { ... }
- ':not()' selector와 '+' adjacent sibling selector의 결합
div:not([style*="display: block"]) + button { ... }
[참고] W3Schools, "CSS Attribute Selectors"
댓글