4

I cannot figure out why animations of background-position aren't working on my version of Chrome of Safari (Webkit Browsers). It's working fine on Firefox.

@keyframes animatedBackground {
  from {
    background-position: 0px 0px; }

  to {
    background-position: 100% 0px; } 
}

.logo {
  width: 600px;
  height: 300px;
  background-image: url("http://placekitten.com/g/200/300");
  background-position: 0px 0px;

  -webkit-animation: animatedBackground 10s linear infinite;
  -moz-animation: animatedBackground 10s linear infinite;
  animation: animatedBackground 10s linear infinite; 
}

http://jsfiddle.net/LkeMitchll/kpBby/2/

Any help greatly appreciated!.

LM.

1 Answer 1

4

You need to prefix @keyframes with the browser-specific prefix "-webkit" as well, see W3Schools

Try adding this to your CSS:

@-webkit-keyframes animatedBackground {
  from {
    background-position: 0px 0px; }

  to {
    background-position: 100% 0px; } 
}

Fixed fiddle: http://jsfiddle.net/kpBby/3/

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.