I have a <svg id="image">
in my HTML page and I would like to use that image as a border.
What I find online is that you can add in CSS:
border-image: url('/some/path/to/image.svg');
What I would like to do is to reference the SVG located in the page. Here is what I tried:
div {
border: 10px solid;
border-image: url('#round-rect');
border-image-slice: 10;
}
svg {
display: none;
}
<div>This should have rounded corners</div>
<svg id="round-rect">
<rect width="30" height="30" rx="10">
</svg>
Is there a way to do that?