css中的:not()选择器和jQuery中的.not()方法怎么用
导读:本文共656.5字符,通常情况下阅读需要2分钟。同时您也可以点击右侧朗读,来听本文内容。按键盘←(左) →(右) 方向键可以翻页。
摘要: css中:not()选择器用法 :not伪类选择器可以筛选不符合表达式的元素,:not(selector)其中的selector为css选择器 ulli:not(:first-child) ulli:not(.text)//不包含class="text"的元素 :not(p)//非... ...
目录
(为您整理了一些要点),点击可以直达。css中:not()选择器用法
:not伪类选择器可以筛选不符合表达式的元素,:not(selector)其中的selector为css选择器
ulli:not(:first-child)
ulli:not(.text)//不包含class="text"的元素
:not(p)//非段落元素
ulli:not(:first-child):not(:last-child)//not可叠加使用
jQuery中.not()方法
not()从匹配元素集合中删除元素。
$("p").not("#selected")//选择id!=selected的段落元素
$('li').not(':even').css('background-color','red');//选择不是偶数的li元素
选择class!=test的input元素的两种方法
$(input:not(.test)).css(...);$(input).not(".test").css(...);
</div> <div class="zixun-tj-product adv-bottom"></div> </div> </div> <div class="prve-next-news">
css中的:not()选择器和jQuery中的.not()方法怎么用的详细内容,希望对您有所帮助,信息来源于网络。