I am using a linear-gradient
as border-imagem
in an element, but this way the border does not respect the border-radius
that I put and does not curl the vertices.
I'd like it to look like this:
Butitlookslikethis:
Hereisthecodefortheimageabove.Ileftbox-shadow
toseethat.box
elementhasborder-radius
workingcorrectly,butborder-imagem
doesnotrespectthisborder-radius
andcontinueswithoutcurvingatvertices.
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
display: flex;
}
.box {
position: relative;
width: 400px;
height: 160px;
margin: auto;
border: 2px solid;
border-image: linear-gradient(red, blue);
border-image-slice: 1;
border-radius: 20px;
box-shadow: 0 0 0 1px green;
}
<div class="box"></div>