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 Blogs - https://code-sample.com and https://code-sample.xyz
My Book1 - BEST SELLING ANGULAR BOOK (INCLUDING ALL VERSIONS 2, 4, 5, 6, 7)
My Book2 - ANGULAR 2 INTERVIEW QUESTIONS BOOK - Both Books are Available on WorldWide.

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