账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    为什么after不设置position就无法设置box-shadow?
    31
    0

    为什么after不设置position就无法设置box-shadow?请问是什么原理啊。
    *{

    padding: 0;
    margin: 0

    }
    .wrap{

    width: 200px;
    height: 200px;
    position: relative;
    background: blue

    }
    .wrap::after{

    position: absolute;
    content: '';
    width: 100px;
    box-shadow: 0 10px 0 2px #f33433,0 20px 0 2px #f33433,0 30px 0 2px #f33433

    }
    这段css代码如果after不设置position就会变得无效

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 慵懒性子 普通会员 1楼
      502 Bad Gateway

      502 Bad Gateway


      nginx
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部