css initial_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:33:08
Original
868 people have browsed it

css的initial属性值简单介绍:
用来设置css属性值为它的默认值,也就是浏览器默认设置的css属性值。
此关键字可用于任何HTML元素上的任何CSS属性。
语法结构:

property: initial;
Copy after login

浏览器兼容:
(1).IE浏览器不支持此属性值。
(2).谷歌浏览器支持此属性值。
(3).火狐浏览器支持此属性值。
(4).Opera浏览器支持此属性值。
(5).safria浏览器支持此属性值。
代码实例:

<!DOCTYPE html><html> <head> <meta charset=" utf-8"> <meta name="author" content="http://www.softwhy.com/" /> <title>蚂蚁部落</title> <style type="text/css">#box {  color:red;}#box p {  color:initial;}</style></head><body><div id="box">  <h1>antzone</h1>  <p>蚂蚁部落</p></div></body></html>
Copy after login

上面的代码中,p元素的文字颜色并没有继承div的color属性值,而是使用浏览器默认的颜色值。

原文地址是:http://www.softwhy.com/forum.php?mod=viewthread&tid=18455

更多内容可以参阅http://www.softwhy.com/css3/

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!