From the course: Making Your Site Retina-Ready
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Adding an SVG file (.svg) to your page
From the course: Making Your Site Retina-Ready
Adding an SVG file (.svg) to your page
- One of the first methods for adding SVG to our web pages that most of us will start with is by adding SVG as an image tag. You can see that here on the HiDPI website that I've got. Now this method's pretty easy and it works in a lot of browsers. It does make it a little bit limiting if you want to control parts of the SVG with CSS for instance, or animate it since the image is a single object. But it's pretty easy and it's used quite often, and it's something that we all usually start with and we eventually wind up going to what's called inline SVG. But this is what we're gonna start with. Now I've got a couple of images in the folder here, one called logo-responsive and one called logo. Now log-responsive has the width and height taken out of the code. That was with responsive checked in Illustrator. Logo has the width and height in the code, in the SVG code. So we're gonna see the difference there. We're gonna put both of them in. So go over to my code, and you're gonna see Add…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Understanding SVG5m 12s
-
(Locked)
Making an SVG file using Illustrator8m 50s
-
(Locked)
Optimizing SVG4m 8s
-
(Locked)
Adding an SVG file (.svg) to your page3m 52s
-
(Locked)
Fixes for responsive Internet Explorer5m 20s
-
(Locked)
Adding SVG inline9m 1s
-
(Locked)
Fixes for inline-responsive Internet Explorer5m 44s
-
(Locked)
Adding SVG as inline URI (and why)6m 20s
-
(Locked)
Adding an SVG fallback for older browsers12m 44s
-
(Locked)
-
-
-