开发者

@font-face and -webkit-transform: rotate, doesn't work

开发者 https://www.devze.com 2023-03-25 16:54 出处:网络
I\'m making a website with HTML5 and CSS3 features. I\'ve got two custom fonts which are added through @font-face. They\'re used in logo. They\'re in \'h1\' tags, and I rotated them with CSS3 proporet

I'm making a website with HTML5 and CSS3 features. I've got two custom fonts which are added through @font-face. They're used in logo. They're in 'h1' tags, and I rotated them with CSS3 proporety:

transform: rotate(350deg);

Of course for every browser I used proper prefix (for IE: "-ms-", for FF: "-moz-", for Chrome/Safari: "-webkit开发者_如何学编程-" and for Opera: "-o-"). The problem is that it doesn't rotate in Chrome and Safari. So my question is, does Webkit engine allow to rotate custom fonts with CSS3 properties?


Most inline content doesn't support transforms in webkit browsers - this is a known limitation. Although H1 is a block level tag, my guess is that you're using a span tag (inline) inside the H1 tag around your actual text to add the font, and this is giving you problems.

Add "display: inline-block" and see if that helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消