【发布时间】:2014-12-07 12:10:44
【问题描述】:
我在使用无衬线字体时遇到了标题问题。大多数字形不会“触摸”无衬线字体中包含 div 的左边框,字体越大,它变得越明显。因此,标题似乎与以下常规文本不一致。
这是一个示例代码:
h1 {
font-family: sans-serif;
font-size: 72px;
font-weight: lighter;
}
.container {
border-left: 1px solid;
}
<div class="container">
<h1>F glyph</h1>
<h1>T glyph</h1>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
http://jsfiddle.net/mishamsk/j73wwqa5/
有什么解决办法吗?
【问题讨论】:
-
坦率地说,我不会打扰。一种选择是添加一些否定的
text-indent,但是,正如 F 和 T 字符之间的差异所示,这将取决于标题的文本。跨度> -
是的,看起来是这样。我正在构建一个 wordpress 主题,因此无法预先知道标题文本。我很困惑,以前在网上没有注意到它;)
标签: html css typography