![](/img/trans.png)
[英]How do I create a circle or square with just CSS - with a hollow center?
[英]How do I center this number inside the circle? - CSS
将line-height
设置为框的高度,并使用text-align: center;
因此,您将得到例如:
div {
width: 100px;
height: 100px;
line-height: 100px;
text-align: center;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.