【发布时间】:2015-05-12 21:20:51
【问题描述】:
我尝试使用 font-squirrel 提供的字体 BabeNeue
我使用了以下代码
<input type="submit" name="checkout" value="Checkout" class="checkout">
遵循 CSS
input#purchase, input.checkout, .btn-border {
color: #D39229;
background: rgba(0, 0, 0, 0);
border: 3px #D39229 solid;
font-size: 18px;
padding-left: 20px;
padding-right: 20px;
border-radius: 0px;
padding: 4px 20px;
line-height: 18px;
box-sizing: border-box;
white-space: nowrap;
vertical-align: middle;
display: inline-block;
cursor: pointer;
align-items: start;
-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: 'BebasNeue', 'Trebuchet MS', sans-serif;
font-size: 18px;
}
并从我的location导入字体
现在字体在 Windows 中可以正确渲染,但在 iPhone 和 Mac 上存在问题。文本正在向上移动。
现在,如果我将按钮字体更改为 Arial,它可以在所有浏览器和设备上正常工作。
演示here
【问题讨论】:
-
我认为是字体的上升属性有问题,见stackoverflow.com/q/7535498/2126792