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 clip-path
From the course: CSS: Images
Custom shapes using clip-path
- [Instructor] Circles are great for many designs but there are other times when you need a different shape. Maybe a triangle or a square turned on its side like you see here, or some other shape entirely. For those purposes, you can clip your image using CSS with the help of the clip-path property. Clip-path allows you to define a path and then click the image based on that path. It can be a circle, an ellipses, a polygon or a drawn path, and it can even be a path to find an SVG that you then import into the image and clip your element based on it. Clip-path path is very powerful and it also has a lot of options. So in the next couple of movies, we'll go through each of the options and details so you know how to use them to get the shape you want out of your image.
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
-
-
-
-