html - HTML如何在精确的中心绘制带有大量数字的圆圈?
问题描述
所以我试图在一个大圆圈上显示一个像 99 这样的大数字,我读过这个并使用了它的代码,但是这个数字并没有在正中间对齐。这是我到目前为止所拥有的:
.circle {
width: 300px;
height: 300px;
margin-top: 20px;
margin-left: 20px;
border-radius: 50%;
font-size: 200px;
color: #fff;
line-height: 500px;
text-align: center;
background: #000;
}
<div class="circle" id="date">99</div>
解决方案
推荐阅读
- python - 是否有一种方法可以将字符串放入列表中的次数在字典中指定的次数?
- python - 将时间戳转换为日、月、年和小时
- video - 在 Wagtail 中,是否有任何选项可以显示带有视频背景的英雄块?
- .net - 在 Visual Studio 中指定相同的密钥文件
- c++ - 返回字符串的散点回文数
- java - 如何反序列化未包装的xml子元素
- typescript - TypeScript's import() typeof json
- python - 从带有评级的列中提取评论
- mongodb - 如何对文档中的数组进行排序?
- python - 当表单字段的属性在视图函数中修改时,validate_on_submit 在 POST 上失败