ant*_*cie 4 html css vertical-alignment
我想创建一个带有文本的按钮圈链接,但我有问题将文本置于圈子按钮内.线高太大.对这个问题有什么建议吗?
这是代码:https://jsfiddle.net/hma443rL/
.btn-donate {
background: #97c83e;
text-align: center;
width: 149px;
height: 148px;
border-radius: 100%;
display: inline-block;
font-size: 35px;
line-height: 2.3;
vertical-align:middle;
color: white;
font-weight: bold;
text-decoration: none
}Run Code Online (Sandbox Code Playgroud)
<a href="" class="btn btn-donate">
Donate <span>Us</span>
</a>Run Code Online (Sandbox Code Playgroud)
我正在尝试创建一个这样的按钮
Flexbox可以做到这一点:
.btn-donate {
background: #97c83e;
text-align: center;
width: 149px;
height: 149px;
border-radius: 100%;
display: inline-flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-size: 35px;
color: white;
font-weight: bold;
text-decoration: none
}Run Code Online (Sandbox Code Playgroud)
<a href="" class="btn btn-donate">Donate <span>Here</span></a>Run Code Online (Sandbox Code Playgroud)