From the course: CSS: Images
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Clip-path: Path
- [Instructor] There's one more basic shape you can use with cliff path, it's called path and it allows you to define any path you want and use it as a clipping path. However, this is bleeding edge so it doesn't work in old browsers. And it also doesn't work the same way as the other eclipse paths. So let me show you how it works because it's a good stepping stone into using SVG filters. But at the same time, be aware that this is probably not something you're going to use a lot, you'll see why in a second. The path attribute allows you to define an actual path. You can draw whatever you want and make it into the path, but you can't really do that in the browser because the markup is quite complex. To draw the path, you need a tool like Adobe illustrator and this is where the complication starts. So for this example, I went in and found out what the size is of the current box. I just right click on the box and then I…
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
-
-
-
-
Rounded corners with border-radius3m 23s
-
(Locked)
Cropping images to a perfect circle2m 37s
-
(Locked)
Custom shapes using clip-path44s
-
(Locked)
Clip-path: Circle3m 2s
-
(Locked)
Clip-path: Ellipse1m 36s
-
(Locked)
Clip-path: Polygon4m 33s
-
(Locked)
Clip-path: Inset2m 6s
-
(Locked)
Clip-path: Path2m 50s
-
(Locked)
Custom shapes using SVG4m 51s
-
(Locked)
Masking an image with another image2m 38s
-
(Locked)
Image text1m 48s
-
(Locked)
Browser compatibility3m 30s
-
-
-
-