Ho creato un'animazione per SVG utilizzando css3 che funziona perfettamente in Chrome e Firefox. E 'parzialmente lavorando in Safari, ma non funziona in Internet Explorer (IE9 + che supporta le animazioni CSS)L'animazione CSS3 non funziona
CSS:
@-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;
}
qualcuno mi può aiutare a risolvere cosa fare per farlo funzionare correttamente anche in Safari e IE?
Non so cosa c'è di sbagliato nel tuo codice o se questa informazione ti è utile, ma dopo un'ora di crack del tuo codice, ** sono in grado di visualizzarlo senza animazione in IE **. Ho cambiato il 'fill-opacity' nel blocco CSS' svg * '. Controlla questo [fiddle] (http://jsfiddle.net/c87vY/4/) – Rohith
Questo sembra un ripiego ideale in quanto l'animazione è la ciliegina e hai davvero bisogno di vedere la torta. – misterManSam
+1 perché l'animazione è fantastica :) –