CSS initial keyword
Examples
Settings <div> element within the text color is red, but for the <h1> element to maintain the initial color:
div {color: red; }
h1 {color: initial; }
h1 {color: initial; }
try it"
Browser Support
Figures in the table represent the first browser to support the version number of the property.
属性 | |||||
---|---|---|---|---|---|
initial | 1.0 | 不支持 | 19.0 | 1.2 | 15.0 |
Definition and Usage
initial keyword is used to set the CSS property to its default value.
initial keyword can be used in any CSS property of any HTML element.
version: | CSS3 |
---|---|
JavaScript syntax: | object .style. property = "initial"try |
CSS Syntax
property : initial;
related articles
CSS inherit Keywords: the inherit keyword