【发布时间】:2021-06-06 03:35:22
【问题描述】:
我有一个包含背景图像和文本的<a> 标签。问题是文本粘在图像的顶部。
<a class="BigBlueButton" href="/where-is-my-order.aspx">
Where Is My Order?
</a>
而我的 CSS 如下:
.BigBlueButton
{
width: 233px;
vertical-align: middle;
text-align: center;
height: 122px;
background: url(../img/GreenBotton.png) no-repeat;
background-repeat: no-repeat;
margin-bottom: 10px;
margin-top: 10px;
margin-left: 1%;
display: inline-block;
color: White;
font-size: large;
font-weight: bold;
text-decoration: none;
vertical-align: middle;
}
我使用了 line-height,但是对于文本稍大的标签,整个文本不会显示。
给定 CSS 和 HTML 内容是什么:
line-height:
【问题讨论】:
-
能否请您提供 jsFiddle 解决您的问题?
-
仅供参考,您的链接具有
BigBlueButton类,但您发布的 CSS 用于BiGreenButton -
那么,你能举一个
line-height不符合你要求的例子吗?