मैंने सीएसएस 3 का उपयोग करके एसवीजी के लिए एक एनीमेशन बनाया है जो क्रोम और फ़ायरफ़ॉक्स में पूरी तरह से काम कर रहा है। यह आंशिक रूप से सफारी में काम कर रहा है लेकिन इंटरनेट एक्सप्लोरर में काम नहीं कर रहा (IE9 + जो सीएसएस एनिमेशन का समर्थन)CSS3 एनीमेशन काम नहीं कर रहा है
सीएसएस:
@-webkit-keyframes dash {
70%,80% {
stroke-dashoffset: 0;
fill-opacity: 0;
}
85% {
fill-opacity: 0;
stroke-opacity: 1;
}
95% {
stroke: #17739D;
stroke-dashoffset: -301;
stroke-opacity: 0;
}
100% {
fill-opacity: 1;
stroke-dashoffset: -301;
}
}
@-ms-keyframes dash {
70%,80% {
stroke-dashoffset: 0;
fill-opacity: 0;
}
85% {
fill-opacity: 0;
stroke-opacity: 1;
}
95% {
stroke: #17739D;
stroke-dashoffset: -301;
stroke-opacity: 0;
}
100% {
fill-opacity: 1;
stroke-dashoffset: -301;
}
}
@-moz-keyframes dash {
70%,80% {
stroke-dashoffset: 0;
fill-opacity: 0;
}
85% {
fill-opacity: 0;
stroke-opacity: 1;
}
95% {
stroke: #17739D;
stroke-dashoffset: -301;
stroke-opacity: 0;
}
100% {
fill-opacity: 1;
stroke-dashoffset: -301;
}
}
@keyframes dash {
70%,80% {
stroke-dashoffset: 0;
fill-opacity: 0;
}
85% {
fill-opacity: 0;
stroke-opacity: 1;
}
95% {
stroke: #17739D;
stroke-dashoffset: -301;
stroke-opacity: 0;
}
100% {
fill-opacity: 1;
stroke-dashoffset: -301;
}
}
#Layer_1 {
margin-left: auto;
margin-right : auto;
top: 50%;
position: absolute;
left: 50%;
margin-left: -65px;
margin-top: -35px;
}
svg {
background: #fff;
display: block;
}
svg * {
stroke: #666;
#stroke: #17739D;
stroke-width: 1;
fill-opacity: 0;
stroke-dasharray: 350;
stroke-dashoffset: 440;
}
svg #bp_svg * {
-webkit-animation-name : dash;
-moz-animation-name : dash;
-ms-animation-name : dash;
animation-name : dash;
-webkit-animation-duration: 4s;
-moz-animation-duration: 4s;
-ms-animation-duration: 4s;
animation-duration: 4s;
-webkit-animation-timing-function : linear;
-moz-animation-timing-function : linear;
-ms-animation-timing-function : linear;
animation-timing-function : linear;
-webkit-animation-fill-mode : forwards;
-moz-animation-fill-mode : forwards;
-ms-animation-fill-mode : forwards;
animation-fill-mode : forwards;
}
किसी को सुलझाने के लिए करने के लिए क्या करना है मेरी मदद कर सकते सफारी और आईई में भी इसे ठीक से काम करें?
मुझे नहीं पता कि आपके कोड में क्या गलत है या यदि यह जानकारी आपके लिए उपयोगी है, लेकिन आपके कोड को क्रैक करने के एक घंटे बाद, ** मैं इसे IE में एनीमेशन के बिना प्रदर्शित करने में सक्षम हूं **। मैंने सीएसएस ब्लॉक 'svg * 'में' fill-opacity' को बदल दिया। यह जांचें [fiddle] (http://jsfiddle.net/c87vY/4/) – Rohith
यह एक आदर्श फॉलबैक जैसा लगता है क्योंकि एनीमेशन आइसिंग है और आपको वास्तव में केक को देखने की ज़रूरत है। – misterManSam
+1 क्योंकि एनीमेशन शांत है :) –