Les SVG
Comment utiliser une image SVG :
# HTML
<img src="monSVG.svg" alt="monSVG" />
# CSS
img {
width="100px";
height="100px";
}
Comment utiliser une image SVG comme background :
# HTML
<main class="monSVG"><main/>
# CCS
.monSVG {
background-image: url(monSVG.svg);
}
La balise SVG
<svg width="500" height="200">
<rect width="100%" height="100%" fill="green" />
</svg>
# Les attributs width et height de la balise <svg> définissent la largeur et la hauteur de la balise SVG
# L'élément <rect> est utilisé pour dessiner un rectangle
# les attributs width et height de la balise <rect> définissent la largeur et la hauteur du rectangle par rapport a la balise <svg>
# L'attribut fill fait référence à la couleur à l'intérieur du rectangle