CSS文本转换问题

时间:2013-09-27 09:40:34

标签: css rotation transform text-rendering rendering-engine

这个问题在这里已被多次询问,但我没有找到解决问题的好方法。有人建议添加背面可见性:隐藏所有前缀的偏差但是没有解决我的问题,也没有使用字体平滑的建议:抗锯齿他的技巧。 我问是否有人最近想出了如何以漂亮的方式呈现CSS旋转文本,而文本似乎没有被破坏。

css rotated text problem in FF24

http://jsfiddle.net/pBtEW/10/

<div>
    <p class="rotated">this text is rotated</p>
    <p class="notrotated">this text is not rotated</p>
</div>
<input type="submit" id="submit1" class="rotated"/><br/>
<input type="submit" id="submit2" class="notrotated"/>

.rotated {
    transform:rotate(-4deg);
    -moz-transform:rotate(-4deg);
    -webkit-transform:rotate(-4deg);
    -o-transform:rotate(-4deg);
    -ms-transform:rotate(-4deg);
}


非常感谢你的帮助。

1 个答案:

答案 0 :(得分:0)

在我的网站上使用315度旋转文本,我使用了font-family:courier with line-height:100%和font-style:normal作为我可接受的跨浏览器解决方案。第二个最佳解决方案(在IE和Mozilla上完美呈现但在Chrome中不完美的文本)是不设置字体系列。