您好,欢迎来到哈瑞养生。
搜索
您的当前位置:首页CSS3的:not(:target)效果_html/css

CSS3的:not(:target)效果_html/css

来源:哈瑞养生


HTML:

	
  • 1
  • 2
  • 3
  • a b c


    CSS:

    @keyframes act{	0%{background:red};	100%{background:white};}li:not(:target){	animation:act 1s ease-in;}



    进入页面的时候,就会执行li:not(:target),效果在三个li都可用


    一旦点击激活target,li:not(:target)就意味着上一个激活的target:

    首先点击a,激活target,li:not(:target)无效果

    再点b,在第一个li处出现效果

    是不是有点坑,呵呵哒。

    他的用处就是在手动图片轮播的时候改变z-index的最佳利器!

    Copyright © 2019- harx.cn 版权所有

    违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

    本站由北京市万商天勤律师事务所王兴未律师提供法律服务