Erreur SVG: XML aidez moi svp

Fermé
nissou783 Messages postés 17 Date d'inscription jeudi 13 décembre 2007 Statut Membre Dernière intervention 24 février 2014 - 8 avril 2009 à 04:17
asevere Messages postés 13084 Date d'inscription lundi 28 janvier 2002 Statut Webmaster Dernière intervention 3 février 2022 - 14 avril 2009 à 15:16
Bonjour,

je cherche a exécuter ce programme SVG à l'aide de firefox, mais j'obtiens l'erreur: Ce fichier XML ne semble pas avoir d'information de style associé avec lui. L'arbre du document est montré ci-dessous.
Voici mon code:

<?xml version="1.0" encoding="utf-8"?>
<svg width="300" height="300">
<circle cx="100" cy="100" r="50" />
<g fill="rgb(100%,0%,0%)">
<circle cx="40" cy="40" r="20" />
</g>
<g transform="rotate(45)">
<g transform="translate(150,50)">
<g transform="scale(0.5,0.5)">
<rect x="210" y="60" width="60" height="120" />
</g>
</g>
</g>
<g style="fill-opacity:0.5">
<g fill="rgb(0%,100%,0%)">
<rect x="120" y="60" width="60" height="120" />
<g fill="rgb(20%,20%,100%)">
<circle cx="110" cy="140" r="20" />
</g>
</g>
</g>
<line x1="150" y1="30" x2="240" y2="290" />
</svg>

svp aidez moi :)
merci
A voir également:

2 réponses

nissou783 Messages postés 17 Date d'inscription jeudi 13 décembre 2007 Statut Membre Dernière intervention 24 février 2014 1
9 avril 2009 à 00:28
up
0
asevere Messages postés 13084 Date d'inscription lundi 28 janvier 2002 Statut Webmaster Dernière intervention 3 février 2022 426
14 avril 2009 à 15:16
Salut,

Essayes comme ça:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300">
<circle cx="100" cy="100" r="50" />
<g fill="rgb(100%,0%,0%)">
<circle cx="40" cy="40" r="20" />
</g>
<g transform="rotate(45)">
<g transform="translate(150,50)">
<g transform="scale(0.5,0.5)">
<rect x="210" y="60" width="60" height="120" />
</g>
</g>
</g>
<g style="fill-opacity:0.5">
<g fill="rgb(0%,100%,0%)">
<rect x="120" y="60" width="60" height="120" />
<g fill="rgb(20%,20%,100%)">
<circle cx="110" cy="140" r="20" />
</g>
</g>
</g>
<line x1="150" y1="30" x2="240" y2="290" />
</svg>
0