I am trying to create a exact rectangle curve shape [brown color] section with border as like in the below image
I able to create exact shape with mask css property but unable to add the border top to the div attached the code for the same and attached the current image below
.item-meta-container {
--c: 50px;
mask: radial-gradient(100% var(--c) at top, #0000 calc(100% - 1px), #000);
background: #35090A;
position: absolute;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
border-radius: 11px;
border: 1px solid #474747;
width:500px;
height:250px;
}
<div class="item-meta-container"></div>
help me with adding the border top to the mask element as like in above image
current image with above css
2
Answers
In fact, using the mask css attribute will simply cut off the visible shape, and neither outline nor border will be displayed. (depends of the mask’s shape of course)
The best way to do this would be to make this curved shape in a svg (and with the border/outline you’re looking for), and put it as a background image (much more flexible way).
Use a similar gradient configuration with background to create the top border