jquery - Multiple keyframe animations break custom slider in Internet Explorer 11 -
edit: added jsfiddle here
we made custom image slider jquery , css3 keyframe animations. image slider works in browsers except ie11. think has simultaneous animations.
basically if navigating through slider. add , remove class previous slide , add new 1 current one. add these classes: .slide-display-top
or .slide-display-bottom
based on direction. after adding, 2 child-divs
start animating bottom , top of screen.
it work when navigate , forth.
live version:
we stuck @ one.
part of css:
body main .slider .slide-display-top { visibility: visible; } body main .slider .slide-display-top>div { height: 100%} body main .slider .slide-display-top>div:first-child { -webkit-animation: movefrombottomfade 700ms ease-in-out; -moz-animation: movefrombottomfade 700ms ease-in-out; -o-animation: movefrombottomfade 700ms ease-in-out; -ms-animation: movefrombottomfade 700ms ease-in-out; animation: movefrombottomfade 700ms ease-in-out; } body main .slider .slide-display-top>div:last-child { -webkit-animation: movefromtopfade 700ms ease-in-out; -moz-animation: movefromtopfade 700ms ease-in-out; -o-animation: movefromtopfade 700ms ease-in-out; -ms-animation: movefromtopfade 700ms ease-in-out; animation: movefromtopfade 700ms ease-in-out; } body main .slider .slide-display-bottom { visibility: visible; } body main .slider .slide-display-bottom>div { height: 100%} body main .slider .slide-display-bottom>div:first-child { -webkit-animation: movefromtopfade 700ms ease-in-out; -moz-animation: movefromtopfade 700ms ease-in-out; -o-animation: movefromtopfade 700ms ease-in-out; -ms-animation: movefromtopfade 700ms ease-in-out; animation: movefromtopfade 700ms ease-in-out; } body main .slider .slide-display-bottom>div:last-child { -webkit-animation: movefrombottomfade 700ms ease-in-out; -moz-animation: movefrombottomfade 700ms ease-in-out; -o-animation: movefrombottomfade 700ms ease-in-out; -ms-animation: movefrombottomfade 700ms ease-in-out; animation: movefrombottomfade 700ms ease-in-out; }
keyframes:
@-webkit-keyframes movefromtopfade { 0% { -webkit-transform: translate(0, -100%); -moz-transform: translate(0, -100%); -o-transform: translate(0, -100%); -ms-transform: translate(0, -100%); transform: translate(0, -100%) } 100% { -webkit-transform: translate(0, 0); -moz-transform: translate(0, 0); -o-transform: translate(0, 0); -ms-transform: translate(0, 0); transform: translate(0, 0) } } @-moz-keyframes movefromtopfade { 0% { -webkit-transform: translate(0, -100%); -moz-transform: translate(0, -100%); -o-transform: translate(0, -100%); -ms-transform: translate(0, -100%); transform: translate(0, -100%) } 100% { -webkit-transform: translate(0, 0); -moz-transform: translate(0, 0); -o-transform: translate(0, 0); -ms-transform: translate(0, 0); transform: translate(0, 0) } } @-ms-keyframes movefromtopfade { 0% { -webkit-transform: translate(0, -100%); -moz-transform: translate(0, -100%); -o-transform: translate(0, -100%); -ms-transform: translate(0, -100%); transform: translate(0, -100%) } 100% { -webkit-transform: translate(0, 0); -moz-transform: translate(0, 0); -o-transform: translate(0, 0); -ms-transform: translate(0, 0); transform: translate(0, 0) } } @-o-keyframes movefromtopfade { 0% { -webkit-transform: translate(0, -100%); -moz-transform: translate(0, -100%); -o-transform: translate(0, -100%); -ms-transform: translate(0, -100%); transform: translate(0, -100%) } 100% { -webkit-transform: translate(0, 0); -moz-transform: translate(0, 0); -o-transform: translate(0, 0); -ms-transform: translate(0, 0); transform: translate(0, 0) } } @keyframes movefromtopfade { 0% { -webkit-transform: translate(0, -100%); -moz-transform: translate(0, -100%); -o-transform: translate(0, -100%); -ms-transform: translate(0, -100%); transform: translate(0, -100%) } 100% { -webkit-transform: translate(0, 0); -moz-transform: translate(0, 0); -o-transform: translate(0, 0); -ms-transform: translate(0, 0); transform: translate(0, 0) } } @-webkit-keyframes movefrombottomfade { 0% { -webkit-transform: translate(0, 100%); -moz-transform: translate(0, 100%); -o-transform: translate(0, 100%); -ms-transform: translate(0, 100%); transform: translate(0, 100%) } 100% { -webkit-transform: translate(0, 0); -moz-transform: translate(0, 0); -o-transform: translate(0, 0); -ms-transform: translate(0, 0); transform: translate(0, 0) } } @-moz-keyframes movefrombottomfade { 0% { -webkit-transform: translate(0, 100%); -moz-transform: translate(0, 100%); -o-transform: translate(0, 100%); -ms-transform: translate(0, 100%); transform: translate(0, 100%) } 100% { -webkit-transform: translate(0, 0); -moz-transform: translate(0, 0); -o-transform: translate(0, 0); -ms-transform: translate(0, 0); transform: translate(0, 0) } } @-ms-keyframes movefrombottomfade { 0% { -webkit-transform: translate(0, 100%); -moz-transform: translate(0, 100%); -o-transform: translate(0, 100%); -ms-transform: translate(0, 100%); transform: translate(0, 100%) } 100% { -webkit-transform: translate(0, 0); -moz-transform: translate(0, 0); -o-transform: translate(0, 0); -ms-transform: translate(0, 0); transform: translate(0, 0) } } @-o-keyframes movefrombottomfade { 0% { -webkit-transform: translate(0, 100%); -moz-transform: translate(0, 100%); -o-transform: translate(0, 100%); -ms-transform: translate(0, 100%); transform: translate(0, 100%) } 100% { -webkit-transform: translate(0, 0); -moz-transform: translate(0, 0); -o-transform: translate(0, 0); -ms-transform: translate(0, 0); transform: translate(0, 0) } } @keyframes movefrombottomfade { 0% { -webkit-transform: translate(0, 100%); -moz-transform: translate(0, 100%); -o-transform: translate(0, 100%); -ms-transform: translate(0, 100%); transform: translate(0, 100%) } 100% { -webkit-transform: translate(0, 0); -moz-transform: translate(0, 0); -o-transform: translate(0, 0); -ms-transform: translate(0, 0); transform: translate(0, 0) } }
we found fix it. reason, translate() did not work when animating 2 divs @ same time. instead of this:
@keyframes movefrombottomfade { 0% { -webkit-transform: translate(0, 100%); -moz-transform: translate(0, 100%); -o-transform: translate(0, 100%); -ms-transform: translate(0, 100%); transform: translate(0, 100%) } 100% { -webkit-transform: translate(0, 0); -moz-transform: translate(0, 0); -o-transform: translate(0, 0); -ms-transform: translate(0, 0); transform: translate(0, 0) } }
we used this:
@keyframes movefrombottomfade { 0% { position:absolute; bottom:-100%; } 100% { position:absolute; bottom:0%; } }
everything works smooth now. thank internet explorer....
Comments
Post a Comment