css :not()选择器怎么用


当前第2页 返回上一页

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

.pr-pos-box_tab {

  display: inline-block;

  margin-right: 5px;

  padding: 10px 12px 8px;

  color: @pr-dark-grey-2;

  font-size: 13px;

  font-weight: bold;

  background-color: @pr-middle-grey; 

  cursor: pointer;

  &:last-child{

    margin-right: 0;

  }

}

  

  

.pr-pos-box_tab:not(.pr-pos-box_tab--selected) {

  &:hover{

    background-color: @pr-light-grey-7;

  }

}

看出不同了么?

对~用了not(.pr-pos-box_tab--selected)来使hover的时候不作用到pr-pos-box_tab--selected标签上

改变后的效果图:

(学习视频分享:css视频教程)

以上就是css :not()选择器怎么用的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

如何在文字下面添加下划线

css样式引入方式的优缺点对比

css font-size 不管用怎么办

css3 flexbox该怎么使用?

html以及css的常用用法

css page-break-after属性怎么用

css里一段字没有充满一行怎么办

css继承样式有哪些

如何解决element ui css出错问题

css如何增加权重

更多相关阅读请进入《css》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...