只能實(shí)現(xiàn)這種效果 標(biāo)紅的區(qū)域怎么能填充上顏色
<div?style="width:?300px;height:?300px;background-color:?rgba(47,41,90,0.14);position:?relative;overflow:?hidden;"> ????<div?style="width:?300px;height:?300px;border:?40px?dotted?#36CBCB;box-sizing:?border-box;position:?relative;"> ????????<div?style="background-color:?#36CBCB;width:?260px;height:?260px;position:?absolute;top:?-20px;left:?-20px;"></div> ????</div> </div>
2021-08-16
? ? <div style="width: 300px;height: 300px;background-color: rgba(47,41,90,0.14);overflow: hidden;">
<div style="background-color: red;width: 260px;height: 40px;position: absolute;top: 0px;left: 20px;" ></div>
? ? ? ? <div style="width: 300px;height: 300px;border: 40px dotted #36CBCB;box-sizing: border-box;position: relative;">
? ? ? ? ? ? <div style="background-color: #36CBCB;width: 260px;height: 260px;position: absolute;top: -20px;left: -20px;"></div>
? ? ? ? </div>
? ? </div>
我是填充了一層紅色來當(dāng)邊框的背景,也是通過定位來實(shí)現(xiàn)的,由于先寫層級(jí)低于后面的邊框?qū)?/p>