相关疑难解决方法(0)

底部几个像素的文字被切断

我真的无法弄清楚在这种情况下发生了什么.在多行文本上,底部的几个像素被截断.

html css

18
推荐指数
2
解决办法
3万
查看次数

使用CSS @ font-face时,为什么我的下降器会被切断?

我正在使用Google webfonts API在页面上嵌入Droid Sans.一切都很好,除了下降器(即y,g等上的dangly位).我的Windows Vista盒子上的最新版本的Firefox,IE和Chrome都是最重要的.

<!DOCTYPE html>
<html>
<head>
 <title>Droid sans descender test</title>
 <meta charset="utf-8">
 <link href="http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold" rel="stylesheet" type="text/css">
 <style type="text/css">
  body { font-size: 16px; font-family: "Droid Sans", sans-serif; }
  h1, h2, h3 { margin: 1em 0; font-weight: normal; }
  h1 { font-size: 2em; }
  h2 { font-size: 1.5em; }
  h3 { font-size: 1em; }
 </style>
</head>    
<body>
 <h1>A bug ran under the carpet anyway</h1>
 <h2>A bug ran under the carpet anyway</h2>
 <h3>A bug ran under the carpet anyway</h3>
</body> …
Run Code Online (Sandbox Code Playgroud)

css font-face

17
推荐指数
2
解决办法
2万
查看次数

Chrome会切断左侧的字体,Firefox和IE都可以正常显示。Chrome错误?

我有一个带有自定义字体(Linotype的Didot)为斜体的常规H3元素。看到:

剪下的文字

问题在于,Chrome浏览器会截取该类型的部分(例如后代和衬线),而其他浏览器会很好地显示该类型。H3不在具有隐藏溢出的任何容器中。

我已经尝试过(没有运气):

  • overflow: visible
  • text-rendering: optimizeLegibility; (和其他值)
  • * { overflow: visible !important; }
  • 其他“字距调整”技巧

似乎可行的唯一解决方案是给H3留一些左填充...但是我觉得这是不合适的解决方案,因为这样我就必须将标题下方的所有内容都向右移动相同的量。

有什么想法吗?

html css dom google-chrome css3

1
推荐指数
2
解决办法
2759
查看次数

标签 统计

css ×3

html ×2

css3 ×1

dom ×1

font-face ×1

google-chrome ×1