iOS Safari + CSS calc() + CSS transition = Instant Crash

前端 未结 7 1278
既然无缘
既然无缘 2020-12-25 12:07

When I try to use left: -webkit-calc(100% - 100px); (assuming that left: 0; is initial state) it works in iOS 6.0.1 just fine. But when I do the sa

7条回答
  •  感动是毒
    2020-12-25 12:27

    Perhaps do something like this:

    .class{
        left: -webkit-calc(100% - 100px);
        transition: margin-left 1s linear, right 1s linear;
    }
    
    
    .class.open {
        margin-left: -100%;
        right: 100px;
    }
    

    WARNING: Untested

提交回复
热议问题