我有下圖,但我需要藍色部分在白色 div 內。嘗試溢位:隱藏但不起作用。我怎樣才能讓它不可見并保留白色 div 的邊框半徑。

<div class="qrcode" style=" z-index: 1;display: block; margin: auto; text-align: center; height: 250px; width: 300px; border-radius: 4%; background-color: #ffffff;">
<div class="brand" style=" background-color:rgb(0, 214, 255); height: 260px; width:50px;">
</div>
</div>
uj5u.com熱心網友回復:
overflow: hidden確實有效:
body {
background: black;
}
<div class="qrcode" style=" z-index: 1;display: block; margin: auto; text-align: center; height: 250px; width: 300px; border-radius: 4%; background-color: #ffffff;overflow:hidden">
<div class="brand" style=" background-color:rgb(0, 214, 255); height: 260px; width:50px;">
</div>
</div>
我認為最好將孩子的身高設定得更小
uj5u.com熱心網友回復:
您可以嘗試添加overflow-y: hidden到您的qrcode班級
uj5u.com熱心網友回復:
overflow:hidden正在作業,您可以看到以下內容:
<div class="qrcode" style=" z-index: 1;display: block; margin: auto; text-align: center; height: 250px; width: 300px; border-radius: 4%; background-color: #F7F7F7; overflow:hidden;">
<div class="brand" style=" background-color:rgb(0, 214, 255); height: 260px; width:50px;">
</div>
</div>
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/535634.html
標籤:网页格式CSS
上一篇:洗掉或修改行內css
下一篇:htmlh1標簽沒有顯示型別
