css中的:not()选择器和jQuery中的.not()方法怎么用(css,jquery,not,web开发)

时间:2024-05-04 11:24:29 作者 : 石家庄SEO 分类 : web开发
  • TAG :

  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(...);

css中的:not()选择器和jQuery中的.not()方法怎么用

 </div> <div class="zixun-tj-product adv-bottom"></div> </div> </div> <div class="prve-next-news">
本文:css中的:not()选择器和jQuery中的.not()方法怎么用的详细内容,希望对您有所帮助,信息来源于网络。
上一篇:Django如何实现简单登录下一篇:

6 人围观 / 0 条评论 ↓快速评论↓

(必须)

(必须,保密)

阿狸1 阿狸2 阿狸3 阿狸4 阿狸5 阿狸6 阿狸7 阿狸8 阿狸9 阿狸10 阿狸11 阿狸12 阿狸13 阿狸14 阿狸15 阿狸16 阿狸17 阿狸18