【发布时间】:2018-10-08 21:33:58
【问题描述】:
我会尝试使用我以前见过的东西并用 html/css 重新创建它。这是我在 Word 中制作的模型。
我发现的几乎所有内容都是关于inside 圆圈的文字,而不是后面的重音,就像这张图。我想让圆圈和文本尽可能居中。
这是我最好的尝试:https://jsfiddle.net/FNdXz/559/
#container
{
height:400px;
width:400px;
background-color: #ccc;
display: table-cell;
}
#inner
{
height:200px;
width:200px;
background:transparent;
border-radius: 100px;
-moz-border-radius: 100px;
-webkit-border-radius: 100px;
margin-left:25%;
margin-top:25%;
border: 1px solid white;
}
#test {
color: black;
text-align: center;
vertical-align: middle;
font-size: 50px;
}
#sub-test {
color: blue;
text-align: center;
font-size: 30px;
}
<div id="container">
<div id="test">
Hello World
</div>
<div id="sub-test">
Test, this is only a test
</div>
<div id="inner">
</div>
</div>
显然,我稍后会担心字体和颜色 - 但我真的在定位问题上苦苦挣扎,可以寻求专业人士的帮助。
【问题讨论】:
-
你看过这个(stackoverflow.com/a/27587340/5074998)吗?它似乎有效。