I tested this css loop in Chrome and Safari - works good. But the animation is not working in Firefox and IE.
Where is the problem? I defined the -moz- prefix already. Or should I stop using css transitions for pseudo-elements?
/* fullscreen div */
section_2.cd-single-project.is-loaded.is-full-width:after {
top: 0;
left: 0;
height: 100%;
width: 100%;
/* name */
-webkit-animation-name: fading;
-moz-animation-name: fading;
-ms-animation-name: fading;
-o-animation-name: fading;
animation-name: fading;
/* count */
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
-ms-animation-iteration-count: infinite;
-o-animation-iteration-count: infinite;
animation-iteration-count: infinite;
/* duration */
-webkit-animation-duration: 12s;
-moz-animation-duration: 12s;
-ms-animation-duration: 12s;
-o-animation-duration: 12s;
animation-duration: 12s;
}
/* fade safari */
@-webkit-keyframes fading {
0% { background-image:url("1.jpg"); background-repeat: no-repeat;background-position: center center;background-size: cover; }
25% { background-image:url("2.jpg"); background-repeat: no-repeat;background-position: center center;background-size: cover; }
50% { background-image:url("3.jpg"); background-repeat: no-repeat;background-position: center center;background-size: cover; }
}
/* fade firefox */
@-moz-keyframes fading {
0% { background-image:url("1.jpg"); background-repeat: no-repeat;background-position: center center;background-size: cover; }
25% { background-image:url("2.jpg"); background-repeat: no-repeat;background-position: center center;background-size: cover; }
50% { background-image:url("3.jpg"); background-repeat: no-repeat;background-position: center center;background-size: cover; }
}
/* fade opera */
@-o-keyframes fading {
0% { background-image:url("1.jpg"); background-repeat: no-repeat;background-position: center center;background-size: cover; }
25% { background-image:url("2.jpg"); background-repeat: no-repeat;background-position: center center;background-size: cover; }
50% { background-image:url("3.jpg"); background-repeat: no-repeat;background-position: center center;background-size: cover; }
}
/* fade general */
@keyframes fading {
0% { background-image:url("1.jpg"); background-repeat: no-repeat;background-position: center center;background-size: cover; }
25% { background-image:url("2.jpg"); background-repeat: no-repeat;background-position: center center;background-size: cover; }
50% { background-image:url("3.jpg"); background-repeat: no-repeat;background-position: center center;background-size: cover; }
}
Can you try to add "animation-fill-mode: both" to see something. What is hapenning, I think, is that maybe the animation is already over or isn't triggered.
section_2
is not a valid selector unless custom element <section_2></section_2>
is within html
?
Is section_2
a class
of an element , missing .
.section_2
?, or an id
of an element missing #
#section_2
?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.