下同 :nth-child(-n+4)选取小于等于4标签 :nth-child(2n)选取偶数标签,2n也可以是even :nth-child(2n-1)选取奇数标签,2n-1可以是odd :nth-child(3n+1)自定义选取标签,3n+1表示“隔二取一” :last-child选取最后一个标签 :nth-last-child(3)选取倒数第几个标签,3表示选取第3个...
:nth-child(3n+1) 表示三个数里边取一个,也就是“隔二取一”. 样例1: <swiperclass="swiper-container"><swiper-item><viewclass="item">case1</view></swiper-item><swiper-item><viewclass="item">case2</view></swiper-item><swiper-item><viewclass="item">case3</view></swiper-item><swiper...
:nth-child(2n-1)选取奇数标签,2n-1可以是odd :nth-child(3n+1)自定义选取标签,3n+1表示“隔二取一” :last-child选取最后一个标签 :nth-last-child(3)选取倒数第几个标签,3表示选取第3个
:nth-child(2n-1)选取奇数标签,2n-1可以是odd :nth-child(3n+1)自定义选取标签,3n+1表示“隔二取一” :last-child选取最后一个标签 :nth-last-child(3)选取倒数第几个标签,3表示选取第3个