CSS border-radius(CSS border-radius)
<style> div {border-radius:5px;background:#cccccc;} span {display:block;} </style> <div> <span>First line</span> <span>Second line</span> </div>
我希望每个
span
都适合圆角内的div
,但它们会在div前面并遮挡圆角。 如果我在每个span
上放置圆角,那么即使它们具有与div
相同的background-color
,您也可以看到每个span
的模糊轮廓。<style> div {border-radius:5px;background:#cccccc;} span {display:block;} </style> <div> <span>First line</span> <span>Second line</span> </div>
I want each
span
to fit inside thediv
with rounded corners, but they go in front of the div and obscure the rounded corners. If I put rounded corners on eachspan
then you can see a faint outline of eachspan
, even if they have the samebackground-color
as thediv
.
原文:https://stackoverflow.com/questions/7148217
更新时间:2023-04-19 22:04