修改所有元素或其父元素的属性为初始值:
div
{
background-color: yellow;
color: red;
all: initial;
}
all 属性用于重置所有属性,除了 unicode-bidi 和 direction。
| 默认值: | none | 
|---|---|
| 继承: | 无 | 
| 动画: | no。 阅读 animatable | 
| 版本: | CSS3 | 
| JavaScript 语法: | object.style.all="initial" | 
The numbers in the table specify the first browser version that fully supports the property.
表格中的数字表示支持该属性的浏览器最低版本号。
| 属性 | ||||||
|---|---|---|---|---|---|---|
| all | 37.0 | 不支持 | 不支持 | 27.0 | 不支持 | 24.0 | 
all: initial|inherit|unset;
| 值 | 描述 | 
|---|---|
| initial | 修改所有元素属性或父元素的值为其初始化值 | 
| inherit | 修改所有元素属性或父元素的值为其父元素的值 | 
| unset | 修改所有元素属性或父元素的值为其父元素的值(如果有继承)或其初始值 | 
备案信息: 粤ICP备15087711号-2
Copyright © 2008-2025 啊嘎哇在线工具箱 All Rights.
本站所有资料来源于网络,版权归原作者所有,仅作学习交流使用,如不慎侵犯了您的权利,请联系我们。