I have a parent div with some background image and try to put some child div into it. Each child div will have a black boarder with only inner radius, so the border could cover the background like in the picture. So basically it feels like the child div is a window with round corner shows the background.
Adding what I have done, tried to do it with two borders but I couldn't fill up the corner if the border width is thin
html:
<div class='parent'>
<div class='borader1'>
<div class='borader2'>
baba
</div>
</div>
</div>
css:
.parent {
height: 100px;
width: 100px;
background: green;
}
.borader1 {
border: 2px solid black;
border-radius: 16px;
height: 98px;
width: 98px;
}
.borader2 {
border: 2px solid black;
position: relative;
height: 98px;
width: 98px;
top: -2px;
left: -2px;
}
https://jsfiddle.net/52vrb1m7/36/
Thank in advance.
