“Sel not”的版本间差异
本页内容
无编辑摘要 |
无编辑摘要 |
||
第1行: | 第1行: | ||
{{DISPLAYTITLE::not(selector)}}[[Category:css | {{DISPLAYTITLE::not(selector)}}[[Category:css selectors|43]] | ||
= CSS3 :not 选择器 = | = CSS3 :not 选择器 = | ||
2022年8月19日 (五) 04:50的最新版本
CSS3 :not 选择器
为每个并非<p>元素的元素设置背景颜色:
示例
:not(p)
{
background:#ff0000;
}
定义和用法
- not(selector) 选择器匹配每个元素是不是指定的元素/选择器。
浏览器支持
表格中的数字表示支持该选择器的第一个浏览器的版本号。
选择器 | Chrome | Internet Explorer / Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
:not() | 4.0 | 9.0 | 3.5 | 3.2 | 9.6 |