Blogger Information
Blog 17
fans 1
comment 0
visits 9518
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
选择器函数-----2018年4月8日
Nic的博客
Original
494 people have browsed it

选择器函数类型:基本选择器(tag,id,class,*)

层级选择器:

  1. 后代: 空格

  2. 所有子元素 >

  3.  相邻兄弟元素 +

  4.  全部兄弟元素 ~

  5. 第一个与最后一个元素

     $('li:first-child').addClass('green')

      $('li:first').addClass('green')

  6. 直接选中某一个元素

    $('li:nth-child(6)').addClass('red')






Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post