这似乎是桌面Chrome和Roboto字体的特定错误。
我在桌面上检测到了这个问题:
问题是,当我div
(见下面的css)小写rt
时,它会以一种非常奇怪的方式显示。
我为演示创建了这段代码:
.container {
word-break: break-word;
}
.line {
padding: 5px;
}
.inline-block {
display: inline-block;
padding: 7px 10px;
background-color: #efefef;
border: 1px solid silver;
overflow: auto;
white-space: pre-wrap;
font-family: Roboto;
}

<link href='https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic' rel='stylesheet' type='text/css'>
<div class="container">
<div class="line">
<div class="inline-block">rt</div>
</div>
<div class="line">
<div class="inline-block">rt rt rt</div>
</div>
<div class="line">
<div class="inline-block">morty</div>
</div>
<div class="line">
<div class="inline-block">mo rty</div>
</div>
<div class="line">
<div class="inline-block">mo Rty</div>
</div>
<div class="line">
<div class="inline-block">mo rTy</div>
</div>
</div>
&#13;
您可以编写rt
个字母的其他组合来查看这种奇怪的行为。
顺便说一下 -
那么,我怎样才能disable
这种行为而不改变css
?
答案 0 :(得分:1)
font-kerning: none;
希望它不会影响网站设计。
.container {
word-break: break-word;
}
.line {
padding: 5px;
}
.inline-block {
display: inline-block;
padding: 7px 10px;
background-color: #efefef;
border: 1px solid silver;
overflow: auto;
white-space: pre-wrap;
font-family: Roboto;
font-kerning: none;
}
<link href='https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic' rel='stylesheet' type='text/css'>
<div class="container">
<div class="line">
<div class="inline-block">rt</div>
</div>
<div class="line">
<div class="inline-block">rt rt rt</div>
</div>
<div class="line">
<div class="inline-block">morty</div>
</div>
<div class="line">
<div class="inline-block">mo rty</div>
</div>
<div class="line">
<div class="inline-block">mo Rty</div>
</div>
<div class="line">
<div class="inline-block">mo rTy</div>
</div>
</div>