以下是我的代碼,其中我無法創建底部曲線,但增加邊框頂部左半徑/邊框頂部右半徑無法創建如圖所示的凹凸。讓我知道如何才能使用CSS來處理這個問題。如何在div中添加底部曲線 - CSS?
代碼:
.container {
position: relative;
}
.rect {
width: 334.5px;
height: 223px;
background: #34EFEE;
text-align: center;
line-height: 223px;
}
.rect:after {
content: '';
position: absolute;
bottom: 0px;
width: 334.5px;
height: 15px;
background: #FFFFFF;
left: 0;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
}
<div class="container">
<div class="rect">
<h3>334.5 X 223</h3>
</div>
</div>
預期輸出 -
PLNKR - http://plnkr.co/edit/7oTCHyn8PFABri0KHSrH?p=preview
THX的代碼,但如果你發現你片斷中,凹凸是不是在中間,但在左側。 – Nesh