Become a MacRumors Supporter for $25/year with no ads, private forums, and more!

why use svg files?

zoran

macrumors 68040
Original poster
Jun 30, 2005
3,418
50
What are the advantages that is offered by the use of an svg file when designing a website?
 

ArrayOfLilly

macrumors newbie
Aug 16, 2017
24
8
Budapest, Hungary
It's a vector graphic format, widely supported. Its size is tiny, you can modify it on the fly.

Change the visible part of it, change its dimensions, colorings or effects. You can animate it. You can do all listed modification by code.

What else do you need? :)
 
Comment

lpetrich

macrumors member
Nov 26, 2009
39
0
Inlined SVG has the nice property that each SVG object is exposed as part of its page's DOM (Domain Object Model). That means that one can manipulate SVG objects with JavaScript, like what one can do with other page contents. It's an alternative to HTML Canvas. Here are some examples that I've written:

2D Point-Group Demo
Organism-Symmetry Demo

Firefox can apply SVG filters to webpage contents, and I've created a color-blindness simulator that operates on webpages: Color-Blindness Simulator for Webpages
 
Comment

skllzdatklls

macrumors newbie
Sep 22, 2011
14
0
I use them a lot to manipulate objects since there's many adjustments we need to make in order to function properly.
 
Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.