CSS: class selectors
match class name
.val-
Any element with attribute
classvalue of valSame as
[class~="val"].navback-6966 { border: solid 1px grey; }
match multiple class name
.val1.val2.etc-
Any element with attribute
classvalue of val1 and val2 and etc<div class="aa bb"> something </div> .aa.bb { border: solid 1px red; }
match tag name and class name
tag.val-
Element tag with attribute
classvalue of val.Same as
tag[class~="val"]nav.x6981 { border: solid 1px grey; }
HTML class attribute
CSS, Selectors
- CSS. Selector. Index
- CSS: selector tutorial
- CSS: type selector (tag name)
- CSS: class selectors
- CSS: ID selectors
- CSS: attribute selector
- CSS: multiple attribute selector
- CSS: selector list (grouping selectors)
- CSS: root selector
- CSS: child selector (check parent)
- CSS Selector: no child
- CSS Selector: check descendant (has)
- CSS Selector: check sibling
- CSS Selector: pseudo-class
- CSS Selector: pseudo-element
- CSS Selector: negation (not)
- CSS Selector: is any of (is, where)
- CSS Selector: Simple, Compound, Combinator, Complex
- CSS Selector: pseudo-class functions