An Interest In:
Web News this Week
- April 4, 2024
- April 3, 2024
- April 2, 2024
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
February 28, 2017 12:57 pm GMT
Original Link: http://meyerweb.com/eric/thoughts/2017/02/24/scaling-svg-clipping-paths-for-css-use/
Scaling SVG Clipping Paths for CSS Use
A legit CSS trick documented by Eric Meyer!
So there is polygon()
in CSS and <polygon>
in SVG. They are closely related, but there are all kinds of weirdnesses. For example, you can use path()
in CSS to update the d attribute of a <path>
, but you can't do the same with polygon()
and <polygon>
.
Part of the problem is that polygon()
in CSS only accepts numbers with units, like px, %, em, or whatever.
.clip-me {
…
Scaling SVG Clipping Paths for CSS Use is a post from CSS-Tricks
Original Link: http://meyerweb.com/eric/thoughts/2017/02/24/scaling-svg-clipping-paths-for-css-use/
Share this article:
Tweet
View Full Article