L
L
lightalex2014-10-23 23:53:03
css
lightalex, 2014-10-23 23:53:03

How to embed svg image in html page?

Hello!
Please do not immediately send to Google) The
question is:
What is the best way to embed an svg image into an html page at the moment?
That is, to make it cross-browser friendly and more optimized?
I found old articles, but I doubt that standards have not changed in a couple of years)

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
deleted-tnorman, 2014-10-24
@deleted-tnorman

palmistry.hol.es -
Optimization measures after copying from a file made in the "incskape" editor and saved as hand.svg
- pasted all the code copied from the SVG file onto the page
- cleaned up some garbage that remains after the editor
- signed the elements with his classes
- as far as he could - he took out the styles in the CSS file in order to free up even more space
SVG is ready to go. There are selectors that can be used to manipulate through jQuery just like any other tags on the page.
This is without discussing the server side. Quite enough to work comfortably.

U
ugodrus, 2014-10-24
@ugodrus

Crossbrowser - no way. My sites are still visited with IE6 but not more than 1%. Full SVG support since 9ki. And there are a lot of users from 8 (over 5%). In general, the issue is relevant and requires crutches. I used to do with svgweb .

K
Keyten, 2014-10-24
@Keyten

Embed is possible.
I think object too.
Some people seem to understand img.
And also there is an inline svg.

S
SerzN1, 2014-10-30
@SerzN1

Sara Soueidan tells in order what's what
https://www.youtube.com/watch?v=lf7L8X6ZBu8&list=P...
https://docs.google.com/presentation/d/1Iuvf3saPCJ...
if you need something faster INLINE SVG
caniuse.com/#search=inline%20svg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question