Keyframe rules not working on firefox - html

Animations not working on firefox but working on chrome and IE. please help Keyframe rules are set for moz #-moz-keyframes cf4FadeInOut the problem is that all keyframes rules are set for webkit moz and -o- but still not working.
http://jsfiddle.net/eVULR/1/
/* full image slider */
#-webkit-keyframes cf4FadeInOut {
0% {opacity:1;}
19% {opacity:1;}
25% {opacity:0;}
94% {opacity:0;}
100% {opacity:1;}
}
#-moz-keyframes cf4FadeInOut {
0% {opacity:1;}
19% {opacity:1;}
25% {opacity:0;}
94% {opacity:0;}
100% {opacity:1;}
}
#-o-keyframes cf4FadeInOut {
0% {opacity:1;}
19% {opacity:1;}
25% {opacity:0;}
94% {opacity:0;}
100% {opacity:1;}
}
#keyframes cf4FadeInOut {
0% {opacity:1;}
19% {opacity:1;}
25% {opacity:0;}
94% {opacity:0;}
100% {opacity:1;}
}
#cf4a
{
overflow:hidden;
position: fixed;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background-color:black;
}
#cf4a img
{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
min-width: 50%;
min-height: 50%;
}
#cf4a img {
-webkit-animation-name: cf4FadeInOut;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
-webkit-animation-duration: 20s;
-moz-animation-name: cf4FadeInOut;
-moz-animation-timing-function: ease-in-out;
-moz-animation-iteration-count: infinite;
-moz-animation-duration: 20s;
-o-animation-name: cf4FadeInOut;
-o-animation-timing-function: ease-in-out;
-o-animation-iteration-count: infinite;
-o-animation-duration: 20s;
animation-name: cf4FadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 20s;
}
#page-wrap, #cf4a img:nth-of-type(1) {
-webkit-animation-delay: 0s;
-moz-animation-delay: 0s;
-o-animation-delay: 0s;
animation-delay: 0s;
z-index:4;
}
#page-wrap{
-webkit-animation-name: cf4FadeInOut;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
-webkit-animation-duration: 20s;
-moz-animation-name: cf4FadeInOut;
-moz-animation-timing-function: ease-in-out;
-moz-animation-iteration-count: infinite;
-moz-animation-duration: 20s;
-o-animation-name: cf4FadeInOut;
-o-animation-timing-function: ease-in-out;
-o-animation-iteration-count: infinite;
-o-animation-duration: 20s;
animation-name: cf4FadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 20s;
-webkit-animation-delay: 3s;
-moz-animation-delay: 3s;
-o-animation-delay: 3s;
animation-delay: 3s;
z-index:5;
}
#page-wrap1,#cf4a img:nth-of-type(2) {
-webkit-animation-delay: 4s;
-moz-animation-delay: 4s;
-o-animation-delay: 4s;
animation-delay: 4s;
z-index:3;
}
#page-wrap1{
-webkit-animation-name: cf4FadeInOut;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
-webkit-animation-duration: 20s;
-moz-animation-name: cf4FadeInOut;
-moz-animation-timing-function: ease-in-out;
-moz-animation-iteration-count: infinite;
-moz-animation-duration: 20s;
-o-animation-name: cf4FadeInOut;
-o-animation-timing-function: ease-in-out;
-o-animation-iteration-count: infinite;
-o-animation-duration: 20s;
animation-name: cf4FadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 20s;
-webkit-animation-delay: 0s;
-moz-animation-delay: 0s;
-o-animation-delay: 0s;
animation-delay: 0s;
z-index:3;
}
#page-wrap2,#cf4a img:nth-of-type(3) {
-webkit-animation-delay: 8s;
-moz-animation-delay: 8s;
-o-animation-delay: 8s;
animation-delay: 8s;
z-index:2;
}
#page-wrap2{
-webkit-animation-name: cf4FadeInOut;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
-webkit-animation-duration: 20s;
-moz-animation-name: cf4FadeInOut;
-moz-animation-timing-function: ease-in-out;
-moz-animation-iteration-count: infinite;
-moz-animation-duration: 20s;
-o-animation-name: cf4FadeInOut;
-o-animation-timing-function: ease-in-out;
-o-animation-iteration-count: infinite;
-o-animation-duration: 20s;
animation-name: cf4FadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 20s;
-webkit-animation-delay: 4s;
-moz-animation-delay: 4s;
-o-animation-delay: 4s;
animation-delay: 4s;
z-index:2;
}
#page-wrap,#cf4a img:nth-of-type(4) {
-webkit-animation-delay: 12s;
-moz-animation-delay: 12s;
-o-animation-delay: 12s;
animation-delay: 12s;
z-index:1;
}

I'm sure you would like a pure CSS solution, but that is not possible right now. Many of the browsers still have not gotten up to the new CSS capabilities.
I would suggest jQuery for your solution. There are several functions within the API such as slideIn(), fadeIn(), fadeOut(), .toggle() etc...
Using these functions is as simple as waiting for DOM ready and then applying your class for the effect your looking for. A quick example is below.
<script type="text/javascript">
$(function() {
$(".myButton").hover(function(){
$(this).fadeOut("slow");
});
});//end dom
</script>

Related

animation rotating boxes css keyframes

The boxes are stacked on top of each other using the position: absolute property. When you hover over the container they should rotate with a delay between and have the border turn orange to create some sort of effect.
They aren't moving at all however.
.main-animation-box {
border: solid orange;
height: 30vh;
width: 16vw;
position: absolute;
}
.email-sub-box:hover .main-animation-box-1 {
animation: box-rotate;
animation-iteration-count: infinite;
animation-timing-function: 5s;
animation-delay: 0s;
}
.email-sub-box:hover .main-animation-box-2 {
animation: box-rotate;
animation-iteration-count: infinite;
animation-timing-function: 5s;
animation-delay: 1s;
}
.email-sub-box:hover .main-animation-box-3 {
animation: box-rotate;
animation-iteration-count: infinite;
animation-timing-function: 5s;
animation-delay: 1.5s;
}
.email-sub-box:hover .main-animation-box-4 {
animation: box-rotate;
animation-iteration-count: infinite;
animation-timing-function: 5s;
animation-delay: 2s;
}
.email-sub-box:hover .main-animation-box-5 {
animation: box-rotate;
animation-iteration-count: infinite;
animation-timing-function: 5s;
animation-delay: 2.5s;
}
#keyframes box-rotate {
10% {
border: solid orange;
}
50% {
transform: rotateY(720deg);
}
}
<div class="email-sub-box email-left">
<div class="main-animation-box main-animation-box-1"></div>
<div class="main-animation-box main-animation-box-2"></div>
<div class="main-animation-box main-animation-box-3"></div>
<div class="main-animation-box main-animation-box-4"></div>
<div class="main-animation-box main-animation-box-5"></div>
</div>
i have changed animation: box-rotate; to animation-name: box-rotate; and animation-timing-function: 5s; to animation-timing-function: ease-out;
.main-animation-box {
border: solid orange;
height: 30vh;
width: 16vw;
position: absolute
}
.email-sub-box:hover .main-animation-box-1 {
animation-name: box-rotate;
animation-duration: 4s;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-timing-function: ease-out;
animation-fill-mode: forwards;
animation-delay: 2s;
}
.email-sub-box:hover .main-animation-box-2 {
animation-name: box-rotate;
animation-duration: 4s;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-timing-function: ease-out;
animation-fill-mode: forwards;
animation-delay: 1s;
}
.email-sub-box:hover .main-animation-box-3 {
animation-name: box-rotate;
animation-duration: 4s;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-timing-function: ease-out;
animation-fill-mode: forwards;
animation-delay: 1.5s;
}
.email-sub-box:hover .main-animation-box-4 {
animation-name: box-rotate;
animation-duration: 4s;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-timing-function: ease-out;
animation-fill-mode: forwards;
animation-delay: 2s;
}
.email-sub-box:hover .main-animation-box-5 {
animation-name: box-rotate;
animation-duration: 4s;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-timing-function: ease-out;
animation-fill-mode: forwards;
animation-delay: 2.5s;
}
#keyframes box-rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
<div class = "email-sub-box email-left">
<div class="main-animation-box main-animation-box-1"></div>
<div class="main-animation-box main-animation-box-2"></div>
<div class="main-animation-box main-animation-box-3"></div>
<div class="main-animation-box main-animation-box-4"></div>
<div class="main-animation-box main-animation-box-5"></div>
</div>

CSS fadein animation not working on a Safari browser

I'm having some problems using CSS animations, I developed my code using Chrome, but now I'm testing it on different browsers I'm having trouble running it on a Safari browser.
JSfiddle
My CSS code
.fade-in {
opacity: 0;
-webkit-animation: fadeIn ease-in 1;
-moz-animation: fadeIn ease-in 1;
-o-animation: fadeIn ease-in 1;
animation: fadeIn ease-in 1;
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
-o-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-duration: .5s;
-moz-animation-duration: .5s;
-o-animation-duration: .5s;
animation-duration: .5s
}
.one {
-webkit-animation-delay: .2s;
-moz-animation-delay: .2s;
-o-animation-delay: .2s;
animation-delay: .2s
}
.two {
-webkit-animation-delay: .5s;
-moz-animation-delay: .5s;
-o-animation-delay: .5s;
animation-delay: .5s
}
.three {
-webkit-animation-delay: .8s;
-moz-animation-delay: .8s;
-o-animation-delay: .8s;
animation-delay: .8s
}
.four {
-webkit-animation-delay: 1.3s;
-moz-animation-delay: 1.3s;
-o-animation-delay: 1.3s;
animation-delay: 1.3s
}
.five {
-webkit-animation-delay: 1.7s;
-moz-animation-delay: 1.7s;
-o-animation-delay: 1.7s;
animation-delay: 1.7s
}
.six {
-webkit-animation-delay: 2.2s;
-moz-animation-delay: 2.2s;
-o-animation-delay: 2.2s;
animation-delay: 2.2s
}
What this code dose is order a fadein animation when the page loads.
Thank you in advance

CSS 3 Keyframes Animation (Opacity) Causes Images to Blur at the End

The animation happens perfectly, images not blurred etc. But when it finishes, image is blurred and stays like that. The browser I am testing is Chrome, but regardless of browser, it happens. All the images used in blink animation are not scalet, they are shown as in their original size. Here's my CSS:
#charset "UTF-8";
#-webkit-keyframes blink {
0% {
opacity:0;
}
11%, 22% {
opacity:1;
}
33%, 100% {
opacity:0;
}
}
#-moz-keyframes blink {
0% {
opacity:0;
}
11%, 22% {
opacity:1;
}
33%, 100% {
opacity:0;
}
}
#-o-keyframes blink {
0% {
opacity:0;
}
11%, 22% {
opacity:1;
}
33%, 100% {
opacity:0;
}
}
#keyframes blink {
0% {
opacity:0;
}
11%, 22% {
opacity:1;
}
33%, 100% {
opacity:0;
}
}
.blink {
opacity:0;
-webkit-animation-duration: 6s;
-moz-animation-duration: 6s;
-o-animation-duration: 6s;
animation-duration: 6s;
-webkit-animation-name:blink;
-moz-animation-name:blink;
-o-animation-name:blink;
animation-name:blink;
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
-o-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
.delay-1{
-webkit-animation-delay: 1s;
-moz-animation-delay: 1s;
-o-animation-delay: 1s;
animation-delay: 1s;
}
.delay-3{
-webkit-animation-delay: 3s;
-moz-animation-delay: 3s;
-o-animation-delay: 3s;
animation-delay: 3s;
}
.delay-5{
-webkit-animation-delay: 5s;
-moz-animation-delay: 5s;
-o-animation-delay: 5s;
animation-delay: 5s;
}
.loop {
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
-o-animation-iteration-count: infinite;
animation-iteration-count: infinite;
}
.timingEaseIn {
-webkit-animation-timing-function: ease-in;
-moz-animation-timing-function: ease-in;
-o-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
And
-webkit-animation-fill-mode:both;
-moz-animation-fill-mode:both;
-o-animation-fill-mode:both;
animation-fill-mode:both;
is coming from another .css file. Any ideas? Thanks!
Same-thing is happening to me,
if I add
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
it no longer blurs for me.

CSS Animation being wonky, any suggestions?

So what I'm working on is a CSS animation, the nav elements and main logo all drop down from above when the page loads (visit www.joeyorlando.me for a live preview of the current animation).
Everything works great except for the fact that if you were to resize the width of your browser, the media queries break the nav appropriately and hide the main nav to show a hamburger-icon mobile nav (still a work in progress). When you resize the window again and make it larger, the animation restarts.
Is there any way to basically tell the animation that once it plays once, never play again and just hold the state that it ended in? I tried using animation-fill-mode: forwards; and animation-iteration-count: 1; to no avail.
HTML
<header>
<div id="hamburger">
<div></div>
<div></div>
<div></div>
</div>
<div class="logo logo-animated bounceInDown">
<h1>Joey Orlando</h1><br>
<h2>Cancer Researcher | Web Developer</h2>
</div>
<nav class="normalNav" id="normalNav">
<ul>
<li>About</li>
<li>Background</li>
<li>Research</li>
<li>Travels</li>
<li>Contact Me</li>
</ul>
</nav>
CSS Animation
.bounceInDown {
-webkit-animation-name: bounceInDown;
animation-name: bounceInDown;
-webkit-animation-iteration-count: 1;
-moz-animation-iteration-count: 1;
animation-iteration-count: 1;
}
.about-animated {
-webkit-animation-duration: 2s;
-webkit-animation-delay: 0s;
animation-delay: 0s;
animation-duration: 2s;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
-webkit-animation-iteration-count: 1;
-moz-animation-iteration-count: 1;
animation-iteration-count: 1;
}
.background-animated {
-webkit-animation-duration: 2s;
-webkit-animation-delay: 0.3s;
animation-delay: 0.3s;
animation-duration: 2s;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
-webkit-animation-iteration-count: 1;
-moz-animation-iteration-count: 1;
animation-iteration-count: 1;
}
.research-animated {
-webkit-animation-duration: 2s;
-webkit-animation-delay: 0.6s;
animation-delay: 0.6s;
animation-duration: 2s;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
-webkit-animation-iteration-count: 1;
-moz-animation-iteration-count: 1;
animation-iteration-count: 1;
}
.travels-animated {
-webkit-animation-duration: 2s;
-webkit-animation-delay: 0.9s;
animation-delay: 0.9s;
animation-duration: 2s;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
-webkit-animation-iteration-count: 1;
-moz-animation-iteration-count: 1;
animation-iteration-count: 1;
}
.contact-animated {
-webkit-animation-duration: 2s;
-webkit-animation-delay: 1.2s;
animation-delay: 1.2s;
animation-duration: 2s;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
-webkit-animation-iteration-count: 1;
-moz-animation-iteration-count: 1;
animation-iteration-count: 1;
}
.logo-animated {
-webkit-animation-duration: 2s;
-webkit-animation-delay: 1.5s;
animation-delay: 1.5s;
animation-duration: 2s;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
-webkit-animation-iteration-count: 1;
-moz-animation-iteration-count: 1;
animation-iteration-count: 1;
}
/**************************
ANIMATION KEYFRAMES - NAVIGATION
**************************/
#-webkit-keyframes bounceInDown {
0% {
opacity: 0;
-webkit-transform: translateY(-2000px);
}
60% {
opacity: 1;
-webkit-transform: translateY(30px);
}
80% {
-webkit-transform: translateY(-10px);
}
100% {
-webkit-transform: translateY(0);
}
}
#keyframes bounceInDown {
0% {
opacity: 0;
transform: translateY(-2000px);
}
60% {
opacity: 1;
transform: translateY(30px);
}
80% {
transform: translateY(-10px);
}
100% {
transform: translateY(0);
}
}
It may not be the best way (I'm not so familiar with CSS3 animations), but you could use JS to detect CSS animation end events and remove the animation classes or try adding: transition: none to the elements you want to stop.
On page load, use JS to check if a session is set, if it's not run the animation and then set the session. When the statement runs again it will detect the previously set session and not run the animation.

Trouble with slideshow animation

I'm a developer with not much CSS experience. I want to create a pure CSS3 slideshow using two images. I found some nifty code for doing so, and I've implemented a very slight variation below (basically I just took out the #cf3 id selector for img .top):
.slide {
position:absolute;
}
#keyframes cf3FadeInOut {
0% {
opacity:1;
}
45% {
opacity:1;
}
55% {
opacity:0;
}
100% {
opacity:0;
}
}
img.top {
animation-name: cf3FadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 10s;
animation-direction: alternate;
}
The first image is defined as <img class="slideshow top" src="img1.jpg">. The second is the same except without the "top" class.
When I load the page, all of my other CSS works, but the animation is nowhere to be found. Anyone see where I went wrong?
You need to add vendor specific property names, CSS3 animation is still a draft spec.
-webkit-animation-name: cf3FadeInOut;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
-webkit-animation-duration: 10s;
-webkit-animation-direction: alternate;
-moz-animation-name: cf3FadeInOut;
-moz-animation-timing-function: ease-in-out;
-moz-animation-iteration-count: infinite;
-moz-animation-duration: 10s;
-moz-animation-direction: alternate;
-o-animation-name: cf3FadeInOut;
-o-animation-timing-function: ease-in-out;
-o-animation-iteration-count: infinite;
-o-animation-duration: 10s;
-o-animation-direction: alternate;
animation-name: cf3FadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 10s;
animation-direction: alternate;
/* and all the keyframes too */
#-webkit-keyframes cf3FadeInOut { ... }
#-moz-keyframes cf3FadeInOut { ... }
#-o-keyframes cf3FadeInOut { ... }
#keyframes cf3FadeInOut { ... }