CSS3 Animation Problem mit Firefox

Übersicht Sonstiges Smalltalk

Neue Antwort erstellen

Knyk

Betreff: CSS3 Animation Problem mit Firefox

BeitragFr, Okt 12, 2012 13:20
Antworten mit Zitat
Benutzer-Profile anzeigen
Ich versuche auf Knopfdruck css3 animationen zu triggern. bei klick des buttons rufe ich die javascriptfunktion start() auf. Die sieht aus wie folgt:

Code: [AUSKLAPPEN]
function start() {
    var t1 = document.getElementById('t1');
  var t2 = document.getElementById('t2');
  var k = document.getElementById('k');
  var zeit ="10s";
  // animation starten

  t1.style.MozAnimationName = "tuer1";
  t1.style.MozAnimationDuration = zeit;
  t1.style.MozAnimationIterationCount = "1";
  t1.style.MozAnimationTimingFunction = "linear";
  t1.style.MozAnimationFillMode = "forwards";
  t2.style.MozAnimationName = "tuer2";
  t2.style.MozAnimationDuration = zeit;
  t2.style.MozAnimationIterationCount = "1";
  t2.style.MozAnimationTimingFunction = "linear";
  t2.style.MozAnimationFillMode = "forwards";
  k.style.MozAnimationName = "knopf";
  k.style.MozAnimationDuration = zeit;
  k.style.MozAnimationIterationCount = "1";
  k.style.MozAnimationTimingFunction = "linear";

  t1.style.webkitAnimationName = "tuer1";
  t1.style.webkitAnimationDuration = zeit;
  t1.style.webkitAnimationIterationCount = "1";
  t1.style.webkitAnimationTimingFunction = "linear";
  t1.style.webkitAnimationFillMode = "forwards";
  t2.style.webkitAnimationName = "tuer2";
  t2.style.webkitAnimationDuration = zeit;
  t2.style.webkitAnimationIterationCount = "1";
  t2.style.webkitAnimationTimingFunction = "linear";
  t2.style.webkitAnimationFillMode = "forwards";
  k.style.webkitAnimationName = "knopf";
  k.style.webkitAnimationDuration = zeit;
  k.style.webkitAnimationIterationCount = "1";
  k.style.webkitAnimationTimingFunction = "linear";

}


für webkit läuft das ganze, aber firefox tut nichts... dabei müsste t1.style.MozAnimationName doch das selbe tun wie t1.style.webkitAnimationName nur eben mit "-moz"? Und für "-o" eigentlich doch ebenfalls?
Die Keyframes sehen bei mir so aus: Code: [AUSKLAPPEN]
@-webkit-keyframes 'tuer1' {
   from       {width: 50%;}
   to         {width: 0%; visibility:hidden; }
}

@-o-keyframes 'tuer1' {
   from       {width: 50%;}
   to         {width: 0%; visibility:hidden;}
}
@-moz-keyframes 'tuer1' {
   from       {width: 50%;}
   to         {width: 0%; visibility:hidden;}
}
@keyframes 'tuer1' {
   from       {width: 50%;}
   to         {width: 0%; visibility:hidden;}
}

@-webkit-keyframes 'tuer2' {
   from       {left: 50%;}
   to        {left: 100%; width: 0px; visibility:hidden;}



}


Hat jemand eventuell ne Ahnung wo der Fehler liegt?

Neue Antwort erstellen


Übersicht Sonstiges Smalltalk

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group