Ich sah gerade diese einfache Svg online FIDDLE HERE.Was ist eine korrekte Art, ein SVG zu deklarieren?
Das HTML sieht wie folgt aus:
<div class="burger-ring is-open">
<svg class="svg-ring">
<path class="path" fill="none" stroke="#fff" stroke-miterlimit="10" stroke-width="4" d="M 34 2 C 16.3 2 2 16.3 2 34 s 14.3 32 32 32 s 32 -14.3 32 -32 S 51.7 2 34 2" />
</svg>
</div>
Ist über eine korrekte Art und Weise SVG zu erklären? Es gibt keine xmlns="http://www.w3.org/2000/svg"
?
Ist die Animation drehen Browser cross? Ich habe in IE, FF, Chrome und Opera getestet.
.path {
stroke-dasharray: 240;
stroke-dashoffset: 240;
stroke-linejoin: round;
}
@-webkit-keyframes dash-in {
0% {
stroke-dashoffset: 240;
}
40% {
stroke-dashoffset: 240;
}
100% {
stroke-dashoffset: 0;
}
}
@keyframes dash-in {
0% {
stroke-dashoffset: 240;
}
40% {
stroke-dashoffset: 240;
}
100% {
stroke-dashoffset: 0;
}
}
@-webkit-keyframes dash-out {
0% {
stroke-dashoffset: 0;
}
40% {
stroke-dashoffset: 240;
}
100% {
stroke-dashoffset: 240;
}
}
@keyframes dash-out {
0% {
stroke-dashoffset: 0;
}
40% {
stroke-dashoffset: 240;
}
100% {
stroke-dashoffset: 240;
}
}
?
Ich habe Fälle gesehen, in denen Browser die SVG nicht richtig darstellen, wenn Sie 'xmlns = 'http://www.w3.org/2000/svg'>' etc ... weglassen. –
https: //developer.mozilla .org/de/docs/Web/SVG/Namespaces_Crash_Course –
@Paulie_D Oh danke, Mann! –