“How to write all property using css”?
CSS All property is used to reset all selected elements properties except to “direction” and “unicode-bidi” and it is using component level resetting of styles. The “initial” is a default property.
All Property Accepts 3 different values as,
1. Initial,
2. Inherit and
3. unset
CSS Syntax:-
.ex1 { background-color: green; color: white; } .ex2 { background-color: green; color: white; all: inherit; } .ex3 { background-color: green; color: white; all: initial; } .ex4 { background-color: green; color: white; all: unset; }
Result look like,
Without All Property,
This is ex1.
With All: Inherit Property,
This is ex2.
With All: Initial Property,
This is ex3.
With All: Unset Property,
This is ex4.