css

CSS all Property and Example [How To]

“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.

ANIL SINGH

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..

My Tech Blog - https://www.code-sample.com/
My Books - Book 1 and Book 2

www.code-sample.com/. Powered by Blogger.
^