IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

HTML Discussion :

afficher SVG en FIREFOX


Sujet :

HTML

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Inscrit en
    Mars 2006
    Messages
    152
    Détails du profil
    Informations forums :
    Inscription : Mars 2006
    Messages : 152
    Par défaut afficher SVG en FIREFOX
    Salut,

    En fait je fais un fichier svg;
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
     
    <?xml version='1.0' encoding='ISO-8859-1' standalone='no'?>
    <svg xmlns:svg='http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd' x='0' y='0' width='1000px' height='450px'>
     
    <rect x='300' y='70' width='150px' height='60px' style='stroke:#000000;fill:#ff0000' />
    <rect x='500' y='70' width='100px' height='60px' style='stroke:#000000;fill:#ffff00' />
    <rect x='650' y='70' width='350' height='60' style='stroke:#000000;fill:#00ff00' />
     
    <rect x='300' y='240' width='150' height='60' style='stroke:#000000;fill:#0000ff' />
    <rect x='550' y='240' width='550' height='60' style='stroke:#000000;fill:#ffa300' />
     
    <rect x='150' y='140' width='50' height='20' style='stroke:#000000;fill:rgb(0,0,255)' />
    <rect x='150' y='300' width='50' height='20' style='stroke:#000000;fill:#ffa300' />
     
    <rect x='0' y='70' width='10' height='180' style='stroke:#000000;fill:#ffa300' />
    <rect x='200' y='439' width='180' height='10' style='stroke:#000000;fill:#ffa300' />
     
    <rect x='0' y='0' width='999px' height='449px' fill='none' stroke='blue' stroke-width='.02cm' />
    </svg>
    et quand je l'ouvre in IE, il ouvre et quand je l'ouvre in firefox il affiche le suivant:
    // Ce fichier XML ne semble pas avoir d'information de style lui étant associé. L'arbre du document est montré ci-dessous.//
    <svg x="0" y="0" width="1000px" height="450px">
    <rect x="300" y="70" width="150px" height="60px" style="stroke:#000000;fill:#ff0000"/>
    <rect x="500" y="70" width="100px" height="60px" style="stroke:#000000;fill:#ffff00"/>
    <rect x="650" y="70" width="350" height="60" style="stroke:#000000;fill:#00ff00"/>
    <rect x="300" y="240" width="150" height="60" style="stroke:#000000;fill:#0000ff"/>
    <rect x="550" y="240" width="550" height="60" style="stroke:#000000;fill:#ffa300"/>
    <rect x="150" y="140" width="50" height="20" style="stroke:#000000;fill:rgb(0,0,255)"/>
    <rect x="150" y="300" width="50" height="20" style="stroke:#000000;fill:#ffa300"/>
    <rect x="0" y="70" width="10" height="180" style="stroke:#000000;fill:#ffa300"/>
    <rect x="200" y="439" width="180" height="10" style="stroke:#000000;fill:#ffa300"/>
    <rect x="0" y="0" width="999px" height="449px" fill="none" stroke="blue" stroke-width=".02cm"/>
    </svg>

    c.a.d il affiche le fichier XML comme un arbre et il affiche pas l'image, c'est quoi la solution???

    Merci,

  2. #2
    Rédacteur
    Avatar de marcha
    Homme Profil pro
    Développeur Web
    Inscrit en
    Décembre 2003
    Messages
    1 571
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : Suisse

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Décembre 2003
    Messages : 1 571
    Par défaut
    Salut,

    Y a un problème dans le doctype ou le namespace, j'ai repris l'entête
    d'un fichier svg que j'avais et j'y a placé ton code, puis il s'ouvre
    correctement sur FireFox

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
     
    <?xml version="1.0"?>
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
             "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
    <svg xmlns="http://www.w3.org/2000/svg"
         xmlns:xlink="http://www.w3.org/1999/xlink">
    <rect x='300' y='70' width='150px' height='60px' style='stroke:#000000;fill:#ff0000' />
    <rect x='500' y='70' width='100px' height='60px' style='stroke:#000000;fill:#ffff00' />
    <rect x='650' y='70' width='350' height='60' style='stroke:#000000;fill:#00ff00' />
     
    <rect x='300' y='240' width='150' height='60' style='stroke:#000000;fill:#0000ff' />
    <rect x='550' y='240' width='550' height='60' style='stroke:#000000;fill:#ffa300' />
     
    <rect x='150' y='140' width='50' height='20' style='stroke:#000000;fill:rgb(0,0,255)' />
    <rect x='150' y='300' width='50' height='20' style='stroke:#000000;fill:#ffa300' />
     
    <rect x='0' y='70' width='10' height='180' style='stroke:#000000;fill:#ffa300' />
    <rect x='200' y='439' width='180' height='10' style='stroke:#000000;fill:#ffa300' />
     
    <rect x='0' y='0' width='999px' height='449px' fill='none' stroke='blue' stroke-width='.02cm' />
    </svg>
    Je te laisse investiguer

  3. #3
    Membre confirmé
    Inscrit en
    Mars 2006
    Messages
    152
    Détails du profil
    Informations forums :
    Inscription : Mars 2006
    Messages : 152
    Par défaut
    Merci bcp, ca marche maintenant.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [SVG] Afficher SVG dans une JSP
    Par soli.f dans le forum XSL/XSLT/XPATH
    Réponses: 1
    Dernier message: 17/07/2007, 12h12
  2. [W3C] [PHP, CSS et W3C] Menu dynamique qui ne s'affiche pas sous Firefox
    Par kervano dans le forum Balisage (X)HTML et validation W3C
    Réponses: 11
    Dernier message: 03/06/2007, 14h25
  3. récupérer l'historique affiché par "Mozilla fireFox" pour exportation
    Par bnadem35 dans le forum Dépannage et Assistance
    Réponses: 4
    Dernier message: 04/08/2006, 13h05
  4. [SVG] Compatible FireFox ?
    Par berceker united dans le forum XML/XSL et SOAP
    Réponses: 5
    Dernier message: 03/08/2006, 10h25
  5. [HTML]Image qui ne s'affiche pas sous firefox...
    Par OrangeBud dans le forum Balisage (X)HTML et validation W3C
    Réponses: 3
    Dernier message: 13/10/2004, 13h42

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo