“Sel not”的版本间差异
本页内容
(创建页面,内容为“{{DISPLAYTITLE::not(selector)}}10 = CSS3 :not 选择器 = 完整CSS选择器参考手册 为每个并非<p>元素的元素设置背景颜色: <sample title="" desc="" lang="html" hererun="1"> :not(p) { background:#ff0000; } </sample> <run name=""> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> <style> p { color: #000000; } :not…”) |
无编辑摘要 |
||
第55行: | 第55行: | ||
{| class="table table-striped table-hover" | {| class="table table-striped table-hover" | ||
! 选择器 | ! 选择器 | ||
! | ! Chrome | ||
! | ! Internet Explorer / Edge | ||
! | ! Firefox | ||
! | ! Safari | ||
! | ! Opera | ||
|- | |- | ||
| :not() | | :not() |
2022年8月19日 (五) 04:34的版本
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 |