Re: Les SVG sont des images comme les autres

nicod_ <[email protected]>
Newsgroups gmane.comp.web.spip.zone,gmane.comp.web.spip.devel
Message-ID <[email protected]>
Le 24/07/2019 à 16:39, Luis Speciale a écrit :
> Une piste pourrait être profiter de l’homothétie par défaut d'un SVG. Si
> dans la déclaration on ajoute an width et un height à 100% on aurait un
> SVG qui s'adapterait à n'importe quel contenant.
> 
> <svg enable-background="new 0 0 417.3 339.6" viewBox="0 0 417.3 339.6"
> xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"
> xmlns:xlink="http://www.w3.org/1999/xlink">

Jusqu'à aujourd'hui, j'utilisais un filtre perso balise_svg, qui ajoute 
un style="max-width:XXXpx; width: 100%;" sur la balise <svg>, plutôt que 
des attributs width et height.

Ça passe plutôt bien (Chrome, FF et IE).

En détail :
http://spip.pastebin.fr/57699

-- 
nicod_
----
[email protected] - https://listes.rezo.net/mailman/listinfo/spip-zone
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.