使用CSS我想繪製一個黑色圓圈,並在其中央有一個白色圓圈。這是我的HTML/CSS:使用CSS在圓圈內創建圓形
#blackcircle {
background-color: black;
color: white;
width: 400px;
height: 400px;
border-radius: 50%;
margin: 0 auto;
}
#whitecircle {
background-color: white;
color: black;
width: 90px;
height: 90px;
border-radius: 50%;
margin: 0 auto;
}
<div id="blackcircle">
<div id="whitecircle"></div>
</div>
但你可以看到(在Chrome和Firefox),白色圓圈在白色圓圈頂部的中心位置。我嘗試過各種位置組合:絕對位置和相對位置:相對於沒有積極影響。
翻錄的Internet Explorer 9 –