css value
Source of CSS values
First of all, we know that although CSS has simple syntax, it is not written blindly. Its properties and values are officially defined, to be precise, they are defined by the browser manufacturer. of.
These given values are nothing more than the following sources:
inherit means inheriting the value from the ancestor element. Every attribute has it.
initial represents the default value of the user agent. Every attribute has it.
Browser-specific values usually have prefixes such as -ms-, -webkit-, etc., and some values have no prefix.
Values shared by browsers. Although they are shared, the implementation of each browser is not necessarily the same.
Therefore, it is certain that css compatibility issues are mostly caused by the inconsistency and evolution of css rendering implemented by browser manufacturers.
Values in CSS specifications
The value finally presented to the user goes through 4 steps: first the specified value (the "specified value"), and then the inherited value (the " computed value"), then converted into the used value (the "used value"), and finally the actual value (the "actual value") obtained due to the limitations of the browser itself.
That is, specifies Value-->Calculated value-->Used value-->Actual value
Specified value
There are three possibilities for specifying the value. One is the default value of the user agent. That is, initial, one is the value written by the artist in the program, and the other is the value that is explicitly specified for inheritance, that is, inherit.
Normally, neither inherit nor initial need to be explicitly specified. But in some cases these 2 values are very useful.
computed value
This is the value calculated by the rendering engine through parsing the CSS file and the inheritance relationship of the cascading rules before the document is formed.
used value
This is the value obtained after css is combined with html to form a document.
Understand that the difference between calculated values and used values is that the browser first parses the HTML and CSS files separately, and then merges them. Please refer to these 2 pictures for details.
webkit rendering process
Geoko rendering process
actual value
is the last browser available For example, all browsers cannot handle 7 decimal places, so the precision will be reduced.
These 4 values are derived from the specification. Other browser implementations may not work according to this 4-step process, but currently mainstream browsers follow this process.
Note that the cascade is different In inheritance. Cascading is for individual CSS properties, inheritance is for elements. Layering often comes with weighting issues.
Chrome Developer
Specify value (3 types)
User agent default value (cannot be changed)
The value with an underscore indicates that it is overridden by the cascading rule, that is, the style is overwritten by the weighted one.
Click 4 to jump to the corresponding node and style view. The part below 4 indicates which element the style is inherited from. Usually you can see the ancestor DOM chain of the element from here.·
- ##The gray part
can be changed, Indicates that the rule is not available and is evaluated at runtime.
- inherit means inheriting the value from the ancestor element. Every attribute has it.
initial represents the default value of the user agent. Every attribute has it.
Browser-specific values usually have prefixes such as -ms-, -webkit-, etc., and some values have no prefix.
Values shared by browsers. Although they are shared, the implementation of each browser is not necessarily the same.
Therefore, it is certain that css compatibility issues are mostly caused by the inconsistency and evolution of css rendering implemented by browser manufacturers.
Values in CSS specifications
The value finally presented to the user goes through 4 steps: first the specified value (the "specified value"), and then the inherited value (the " computed value"), then converted into the used value (the "used value"), and finally the actual value (the "actual value") obtained due to the limitations of the browser itself.
That is, specifies Value-->Calculated value-->Used value-->Actual value
Specified value
There are three possibilities for specifying the value. One is the default value of the user agent. That is, initial, one is the value written by the artist in the program, and the other is the value that is explicitly specified for inheritance, that is, inherit.
Normally, neither inherit nor initial need to be explicitly specified. But in some cases these 2 values are very useful.
computed value
This is the value calculated by the rendering engine through parsing the CSS file and the inheritance relationship of the cascading rules before the document is formed.
used value
This is the value obtained after css is combined with html to form a document.
Understand that the difference between calculated values and used values is that the browser first parses the HTML and CSS files separately, and then merges them. Please refer to these 2 pictures for details.
webkit rendering process
Geoko rendering process
actual value
is the last browser available For example, all browsers cannot handle 7 decimal places, so the precision will be reduced.
These 4 values are derived from the specification. Other browser implementations may not work according to this 4-step process, but currently mainstream browsers follow this process.
Note that the cascade is different In inheritance. Cascading is for individual CSS properties, inheritance is for elements. Layering often comes with weighting issues.
Chrome Developer
Specify value (3 types)
User agent default value (cannot be changed)
The value with an underscore indicates that it is overridden by the cascading rule, that is, the style is overwritten by the weighted one.
Click 4 to jump to the corresponding node and style view. The part below 4 indicates which element the style is inherited from. Usually you can see the ancestor DOM chain of the element from here.·
- ##The gray part
can be changed, Indicates that the rule is not available and is evaluated at runtime.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











I see Google Fonts rolled out a new design (Tweet). Compared to the last big redesign, this feels much more iterative. I can barely tell the difference

Have you ever needed a countdown timer on a project? For something like that, it might be natural to reach for a plugin, but it’s actually a lot more

Everything you ever wanted to know about data attributes in HTML, CSS, and JavaScript.

When the number of elements is not fixed, how to select the first child element of the specified class name through CSS. When processing HTML structure, you often encounter different elements...

Questions about purple slash areas in Flex layouts When using Flex layouts, you may encounter some confusing phenomena, such as in the developer tools (d...

Tartan is a patterned cloth that’s typically associated with Scotland, particularly their fashionable kilts. On tartanify.com, we gathered over 5,000 tartan

At the start of a new project, Sass compilation happens in the blink of an eye. This feels great, especially when it’s paired with Browsersync, which reloads

How to implement Windows-like in front-end development...
