V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Can I use?
http://caniuse.com/
Less
http://lesscss.org
Cool Libraries
Bootstrap from Twitter
Jetstrap
frozenway
V2EX  ›  CSS

css 设置 animation 时单位用 rem,在苹果手机浏览器看,动画内设置的长度和动画外的宽度不一致,请问怎么解决?

  •  
  •   frozenway · 2022-06-07 17:39:55 +08:00 · 944 次点击
    这是一个创建于 660 天前的主题,其中的信息可能已经有所发展或是发生改变。
    .line-jumen{
                    left: 8.8rem; 
                    top: 3.23rem; 
                    width: 1.82485rem; //这里宽度显示正常
                    opacity: 0; 
                    transform: rotate(202deg);
                    animation: linejumen 20s linear;
                    @keyframes linejumen {
                        0%{
                            opacity: 0;
                            width: 0;
                        }
                        59%{
                            opacity: 1;
                            width: 0;
                        }
                        60%{
                            opacity: 1;
                            width: 1.82485rem;//这里显示会比上面的宽度窄许多
                        }
                        100%{}
                    }
                }
    

    同样的长度单位,为什么会这样?

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5581 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 01:40 · PVG 09:40 · LAX 18:40 · JFK 21:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.