我在一个div中有一个div,
<div style="background-color: red; height: 100px; width: 100px; border-radius: 10px;" id="div1">
<div style="background-color: orange;" id="div2">
testing
</div>
</div>
位于div1 顶部的div2 与div1 的曲线不对齐。
即使我改变了div2的边界半径,我也无法完美地对齐div1的半径曲线。如何去掉div1曲线外多余的div2?
jsfiddle here
最佳答案
我们开始:添加溢出:隐藏
<div style="background-color: red; height: 100px; width: 100px; border-radius: 10px; overflow:hidden" id="div1">
<div style="background-color: orange;padding-left:5px" id="div2">
testing
</div>
</div>
关于javascript - 如何将 div 放入 flex 的 div 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42958978/