我正在创建滚动触发的css动画,但是我无法从右侧进行屏幕外过渡。动画完全按照我想要的方式工作,但是它在页面的侧面创建了多余的空格。此空白的大小似乎与我设置的过渡相对应,并且直到我触发了页面上的所有动画之后,该空白才会消失。关于如何删除此空白以使元素从画布移入的任何想法?
这是指向我的测试环境的链接http://lamp.cse.fau.edu/~zellis1/test/
/*Slide in right*/
.slidein-right{
opacity: 0;
-moz-transition: all 750ms ease-out;
-webkit-transition: all 750ms ease-out;
-o-transition: all 750ms ease-out;
transition: all 750ms ease-out;
-moz-transform: translate3d(100px, 0px, 0px);
-webkit-transform: translate3d(100px, 0px, 0px);
-o-transform: translate(100px, 0px);
-ms-transform: translate(100px, 0px);
transform: translate3d(100px, 0px, 0px);
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
backface-visibility: hidden;
}
.slidein-right.in-view{
opacity: 1;
-moz-transform: translate3d(0px, 0px, 0px);
-webkit-transform: translate3d(0px, 0px, 0px);
-o-transform: translate(0px, 0px);
-ms-transform: translate(0px, 0px);
transform: translate3d(0px, 0px, 0px);
}
与CSS动画无关,可以解决此问题的一件事是添加overfrlow-x:到你的身体。
body{
overflow-x: hidden;
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句