Home > Web Front-end > HTML Tutorial > important的妙用_html/css_WEB-ITnose

important的妙用_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:14:56
Original
970 people have browsed it

!important: 为某些样式设置具有最高权值,高于id选择器
用法: !important要写在分号的前面

例如:

<p class="first">!important的效果</p><p>到了三年级下学期时,我们班上了一节公开课,老师提出了一个很<span class="first">简单</p>
Copy after login

p{color:red!important;}p.first{color:green;}
Copy after login
Copy after login

效果:

!important的效果

到了三年级下学期时,我们班上了一节公开课,老师提出了一个很

p{color:red!important;}p.first{color:green;}
Copy after login
Copy after login

效果:

!important的效果

到了三年级下学期时,我们班上了一节公开课,老师提出了一个很

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