欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!
  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()方法,希望能对大家的学习有所帮助。





本文转载自中文网
 

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css3-style/c56744.shtml