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.


Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - http://code-sample.com and http://code-sample.xyz
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like
www.code-sample.com/. Powered by Blogger.
ASK Questions