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

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://www.code-sample.com and http://www.code-sample.xyz
My Books - Google Amazon and Flipkart Book Store!

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.
ASK Questions
SQL Server NodeJs TypeScript JavaScript Angular SQL Server My Book