From the course: CSS: Images

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Custom shapes using SVG

Custom shapes using SVG

From the course: CSS: Images

Custom shapes using SVG

- [Instructor] If you want to clip an image with a custom path like this heart here and you want that image to remain responsive you can't use to path shape in clip path. As you saw in the previous movie the path shape is not responsive so it'll shift around inside the crop and it simply won't look the way you want it to. But that doesn't mean you can't use a custom path to clip your image. It just means you have to involve a separate technology to get it to work. That technology is an SVG. You see, you can use the clip Path element of an SVG as the clip path in CSS and then take advantage of the responsive nature of the SVG to make the path responsive as a clip path in that CSS. Let me show you how this works. First, I need the path itself. You can create the path and any application that gives you a vector graphics. So I've used illustrator and exported it as an SVG. I placed the SVG inside a file called heart.SVG…

Contents