Relative Content

Tag Archive for csssvgclip-path

SVG needs to clip DIV using clipPath

I am confused about getting clipPath to work on an SVG. I want the SVG to clip the background of a DIV (which is a solid color). I can get it to work with another SVG, but not mine (for whatever reason). The SVG can be displayed, and I can get it positioned over the DIV, but when I want to use clipPath, I apparently need to use a transform, and that’s what I don’t understand. I just want the SVG to match the width of the DIV so as the screen size changes, so does the DIV and therefore the SVG width.

SVG needs to clip DIV using clipPath

I am confused about getting clipPath to work on an SVG. I want the SVG to clip the background of a DIV (which is a solid color). I can get it to work with another SVG, but not mine (for whatever reason). The SVG can be displayed, and I can get it positioned over the DIV, but when I want to use clipPath, I apparently need to use a transform, and that’s what I don’t understand. I just want the SVG to match the width of the DIV so as the screen size changes, so does the DIV and therefore the SVG width.