Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: animation pod firefoxem nie współpracuje
Forum PHP.pl > Forum > Po stronie przeglądarki
followc
Witam,

próbuję stworzyć banalną animację za pomocą CSS i tak też się dzieje - chrome i safari reagują tak jak chcę, firefoxa jednak nie potrafię przekonać... kombinuję na wszelkie sposoby z -moz- ale niewielki efekt to przynosi

  1. .grayscale99{
  2. background: #dad8d8 !important;
  3. color: #cccccc !important;
  4. //animation: zmien_kolor 5.4s step-end both;
  5.  
  6. animation-name: zmien_kolor, zmien_bakground;
  7. -moz-animation-name: zmien_kolor, zmien_bakground;
  8.  
  9. animation-duration: 4s;
  10. -moz-animation-duration: 4s;
  11.  
  12. animation-delay: 5.4s;
  13. -moz-animation-delay: 5.4s;
  14.  
  15. animation-fill-mode: forwards;
  16. -moz-animation-fill-mode: forwards;
  17. -webkit-animation-fill-mode: forwards;
  18. }
  19. .grayscale99 h4{
  20. color: #cccccc !important;
  21.  
  22. animation-name: zmien_kolor;
  23. -moz-animation-name: zmien_kolor;
  24.  
  25. animation-duration: 4s ;
  26. -moz-animation-duration: 4s ;
  27.  
  28. animation-delay: 5.4s;
  29. -moz-animation-delay: 5.4s;
  30.  
  31. animation-fill-mode: forwards;
  32. -moz-animation-fill-mode: forwards;
  33. -webkit-animation-fill-mode: forwards;
  34. }
  35. .grayscale100{
  36. filter: none;
  37. -webkit-filter: grayscale(100%);
  38. -moz-filter: grayscale(100%);
  39. -ms-filter: grayscale(100%);
  40. -o-filter: grayscale(100%);
  41. opacity: .5;
  42. animation-name: opacity_gray;
  43. animation-duration: 4s ;
  44. animation-delay: 5.4s;
  45. animation-fill-mode: forwards;
  46. -webkit-animation-fill-mode: forwards;
  47. }
  48. .grayscale101{
  49. border: 1px solid rgba(255, 255, 255,0.1) !important;
  50. animation-name: zmien_border;
  51. -moz-animation-name: zmien_border;
  52.  
  53. animation-duration: 4s ;
  54. -moz-animation-duration: 4s ;
  55.  
  56. animation-delay: 5.4s;
  57. -moz-animation-delay: 5.4s;
  58.  
  59. animation-fill-mode: forwards;
  60. -moz-animation-fill-mode: forwards;
  61. -webkit-animation-fill-mode: forwards;
  62. }
  63. .grayscale101 a{
  64. color: rgba(255, 255, 255,0.1) !important;
  65. animation-name: zmien_kolor2;
  66. -moz-animation-name: zmien_kolor2;
  67.  
  68. animation-duration: 4s ;
  69. -moz-animation-duration: 4s ;
  70.  
  71. animation-delay: 5.4s;
  72. -moz-animation-delay: 5.4s;
  73.  
  74. animation-fill-mode: forwards;
  75. -moz-animation-fill-mode: forwards;
  76. -webkit-animation-fill-mode: forwards;
  77. }
  78.  
  79. .grayscale102 a{
  80. color: rgba(255, 255, 255,0.1) !important;
  81. animation-name: zmien_kolor2;
  82. animation-duration: 4s ;
  83. animation-delay: 5.4s;
  84. animation-fill-mode: forwards;
  85. -webkit-animation-fill-mode: forwards;
  86. }
  87.  
  88. @keyframes zmien_kolor {
  89. from { color: #cccccc }
  90. to { color: #3D3D3D }
  91. //to { color: red }
  92. }
  93. @-moz-keyframes zmien_kolor {
  94. from { color: #cccccc }
  95. to { color: #3D3D3D }
  96. //to { color: red }
  97. }
  98.  
  99. @keyframes zmien_bakground {
  100. from { background: #dad8d8 }
  101. to { background: #f1f0f0; }
  102. //to { color: red }
  103. }
  104. @-moz-keyframes zmien_bakground {
  105. from { background: #dad8d8 }
  106. to { background: #f1f0f0; }
  107. //to { color: red }
  108. }
  109.  
  110. @keyframes opacity_gray{
  111. from{ -webkit-filter: grayscale(100%);
  112. -moz-filter: grayscale(100%);
  113. -ms-filter: grayscale(100%);
  114. -o-filter: grayscale(100%);
  115. opacity: .5;}
  116.  
  117. to{
  118. -webkit-filter: grayscale(0%);
  119. -moz-filter: grayscale(0%);
  120. -ms-filter: grayscale(0%);
  121. -o-filter: grayscale(0%);
  122. opacity: 1;
  123. }
  124. }
  125. @-moz-keyframes opacity_gray{
  126. from{ -webkit-filter: grayscale(100%);
  127. -moz-filter: grayscale(100%);
  128. -ms-filter: grayscale(100%);
  129. -o-filter: grayscale(100%);
  130. opacity: .5;}
  131.  
  132. to{
  133. -webkit-filter: grayscale(0%);
  134. -moz-filter: grayscale(0%);
  135. -ms-filter: grayscale(0%);
  136. -o-filter: grayscale(0%);
  137. opacity: 1;
  138. }
  139. }
  140.  
  141. @keyframes zmien_border{
  142. from{border: 1px solid rgba(255, 255, 255,0.1)}
  143. to{border: 1px solid rgba(255, 255, 255,1)}
  144. }
  145. @-moz-keyframes zmien_border{
  146. from{border: 1px solid rgba(255, 255, 255,0.1)}
  147. to{border: 1px solid rgba(255, 255, 255,1)}
  148. }
  149.  
  150. @keyframes zmien_kolor2{
  151. from{color: rgba(255, 255, 255,0.1)}
  152. to{color: rgba(255, 255, 255,1)}
  153. }
  154. @-moz-keyframes zmien_kolor2{
  155. from{color: rgba(255, 255, 255,0.1)}
  156. to{color: rgba(255, 255, 255,1)}
  157. }


Co robię źle??
trueblue
Skoro nadałeś color i background jako !important, to raczej animacja nie zadziała.
Przy okazji pozbądź się właściwości i klatek z przedrostkiem -moz. Chyba, że robisz to na jakąś starą wersję FF.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2024 Invision Power Services, Inc.