选择器权值
来源:互联网 发布:东莞软件检测机构 编辑:程序博客网 时间:2024/05/18 02:36
下面是权值的规则:
标签的权值为1,类选择符的权值为10,ID选择符的权值最高为100。例如下面的代码:
p{color:red;} /*权值为1*/p span{color:green;} /*权值为1+1=2*/.warning{color:white;} /*权值为10*/p span.warning{color:purple;} /*权值为1+1+10=12*/#footer .note p{color:yellow;} /*权值为100+10+1=111*/
有些特殊的情况需要为某些样式设置具有最高权值,怎么办?这时候我们可以使用!important来解决。注意:!important要写在分号的前面
0 0
- 选择器权值
- css选择器和标签的权值
- CSS 后代选择器和权值计算
- 选择器
- 选择器
- 选择器
- 选择器
- 选择器
- 选择器
- 选择器
- 选择器
- 选择器
- 选择器
- 选择器
- 选择器
- 选择器
- 选择器(
- $选择器
- MapReduce中的SequenceFile和MapFile
- 班主任好帮手之读取学生成绩
- python 数据类型和变量
- ZOJ Problem Set - 3869||Ace of Aces
- 安卓面试十步曲,轻松搞定安卓高薪工作!
- 选择器权值
- I will change the world
- [Python]网络爬虫(一):抓取网页的含义和URL基本构成
- 4 UVA 10924 Prime Words
- HDU-1422 -重温世界杯 - 环上的最长连续子序列
- 数据仓库建设_关系型数据库存储_调度(1)
- 基于BBB的4轮移动轮式机器人系统设计与实现(三)--BeagleBone Black PWM 驱动
- http://oj.leetcode.com/problems/remove-element/
- Linux程序设计(Linux shell编程的例子:在文件名中写入日期)