CSS 变换旋转字母对齐
我使用 CSS Transforms 将 h2 旋转 5deg。
由于某种原因,字母没有对齐。
看一下这里的示例
http://dev.bestprintideas.com/bpi/image.png
这是 CSS
.note-offer h2 {
color: #626262;
text-shadow: none;
text-transform: none;
margin: 15px 0 10px 25px;
-moz-transform: rotate(-5deg);
-webkit-transform: rotate(-5deg);
}
HTML
<div class="note-offer">
<div class="clip"></div>
<h2>
<span class="orange">The Essentials</span> <div>Package</div>
</h2>
<img src="http://mydomain.com/123/200-tag.png">
<p>Duis lobortis ligula vitae mauris lobortis congue. Morbi cursus porttitor feugiat. Aliquam tempus, nunc sed tempor volutpat, dolor lorem mollis quam, a elementum sapien purus ac
<a class="read-more" href="http://dev.bestprintideas.com/bpi/offers/the-essentials-package/">Learn more…</a>
</p>
</div>
为什么会发生这种情况?有谁知道如何解决它。它发生在 FF 3.6 和 Chrome 5 中
编辑:它似乎在 Chrome 5 for Win 和 mac 中正常工作,但在 Linux 上不行。它在 Win、Mac、Linux 的 FF 3.6 中存在问题,但在 Mac 上的 Safari 5 中运行良好
Im using CSS Transforms to rotate an h2 5deg.
For some reason the letters are out of alignment.
Take a look at an example here
http://dev.bestprintideas.com/bpi/image.png
Heres the CSS
.note-offer h2 {
color: #626262;
text-shadow: none;
text-transform: none;
margin: 15px 0 10px 25px;
-moz-transform: rotate(-5deg);
-webkit-transform: rotate(-5deg);
}
HTML
<div class="note-offer">
<div class="clip"></div>
<h2>
<span class="orange">The Essentials</span> <div>Package</div>
</h2>
<img src="http://mydomain.com/123/200-tag.png">
<p>Duis lobortis ligula vitae mauris lobortis congue. Morbi cursus porttitor feugiat. Aliquam tempus, nunc sed tempor volutpat, dolor lorem mollis quam, a elementum sapien purus ac
<a class="read-more" href="http://dev.bestprintideas.com/bpi/offers/the-essentials-package/">Learn more…</a>
</p>
</div>
Why is this happening? Does anyone know how to fix it. Its happening in both FF 3.6 and Chrome 5
EDIT: It seems to work correctly in Chrome 5 for Win and mac but not linux. Its having issues in FF 3.6 for Win, Mac, linux and its working perfectly in Safari 5 on Mac
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Firefox 中存在此问题,已修复、损坏并再次修复。可以通过使用不同的字体来解决(因为不同的字体类型使用不同的渲染路径),或者您可以忍受它,直到浏览器解决它。
There's an issue with this in Firefox which has been fixed, broken and fixed again. It may be possible to work around by using a different font (because different font types use a different rendering path), or you could live with it until the browsers get it sorted out.