CSS animation not working in firefox and IE -


Animated header image does not work in Firefox and IE when there is no problem in Chrome I have added - Animation - Animation in CSS

#headerimg {text-align: center; Height: 500px; Width: 100%; Status: Relative; Margin-down: 15px; Background: URL (images / 1.jpg) no-repeat; Background size: cover; -WebKit-Animation: IP25S Linear 0S Infinite Alternative Running; -MOZ Animation: IP 25S Linear 0S Infinite Alternative is Running; Animation: IP 25S linear 0s infinite alternative; Webkit-Infection: Height 1 S; -MOZ-Infection: Height 1 S; Infection: height 1 S; }

and this animation

  @keyframes imag {0% {background: url (images / 1.jpg) fixed any repeat center center; Background size: cover; } 20% {Background: URL (images / 2.jpg) fixed no-double center center; Background size: cover; } 40% {Background: URL (images / 3.jpg) No repeat center center was fixed; Background size: cover; } 60% {background: URLs (images / 4.jipi) fixed non-repeat center center; Background size: cover; } 80% {Background: URL (images / 5.jipi) fixed non-repeat center center; Background size: cover; } 100% {Background: URL (images / 6.zip) fixed non-repeat center center; Background size: cover; }} @ -WebKit-keyframe image {0% {background: URLs (images / 1.zip) fixed non-repeat center center; Background size: cover; } 20% {Background: URL (images / 2.jpg) fixed no-double center center; Background size: cover; } 40% {Background: URL (Picture / 3. ZIP) fixed non-repeat center center; Background size: cover; } 60% {background: URLs (images / 4.jipi) fixed non-repeat center center; Background size: cover; } 80% {Background: URL (images / 5.jipi) fixed non-repeat center center; Background size: cover; } 100% {Background: URL (images / 6.zip) fixed non-repeat center center; Background size: cover; }} @ -moz-keyframe image {0% {background: URLs (images / 1.jpg) No repeat center center was fixed; Background size: cover; } 20% {Background: URL (images / 2.jpg) fixed no-double center center; Background size: cover; } 40% {Background: URL (images / 3.jpg) No repeat center center was fixed; Background size: cover; } 60% {background: URLs (images / 4.jipi) fixed non-repeat center center; Background size: cover; } 80% {Background: URL (images / 5.jipi) fixed non-repeat center center; Background size: cover; } 100% {Background: URL (images / 6.zip) fixed non-repeat center center; Background size: cover; }}  

First thanks :)

It seems that Both Firefox and IE11 do not like being defined in the shorthand property. You have kept it in the correct position for shortcut syntax, so this is a strange behavior.

Fortunately, is running the default value, so you can delete it. If you want to change the default play state, you can define it as a separate property: animation-play-state: running ; It works fine.

Example of working with background colors

tested in Chrome, Firefox and IE11.

Note that background images can not be animated; They will jump on the image from the image if they want to be faded with / out with opacity .

  #headerimg {text-align: center; Height: 500px; Width: 100%; Status: Relative; Margin-down: 15px; Background: # F00; Background size: cover; Webkit-Animation: ImP 5S Linear 0S Infinite Optional; Animation: IP 5S linear 0s infinite alternative; Infection: height 1 S; } @ -webkit-keyframe image {0% {background: #ff 0; } 20% {Background: # F990; } 40% {Background: # F80; } 60% {Background: # F 066; } 80% {Background: # F50; } 100% {background: # F90; }} @ Keyframe image {0% {background: #ff0; } 20% {Background: # F990; } 40% {Background: # F80; } 60% {Background: # F 066; } 80% {Background: # F50; } 100% {background: # F90; }}  
  & lt; Div id = "headerimg" & gt; & Gt; / Div & gt;  


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -