是否可以使用CSS调整字体的垂直缩放? [英] Is it possible to adjust a font's vertical scaling using CSS?

查看:504
本文介绍了是否可以使用CSS调整字体的垂直缩放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用嵌入字体作为网站上的顶级导航元素
Helvetica65 16px 它是完美的WIDTH,但我需要它是
90%它的当前高度。

I am using an embedded font for the top navigational elements on a site Helvetica65 and at 16px it is the perfect WIDTH but I need it to be about 90% of it's current height.

在Photoshop中,解决方案很简单 - 调整垂直缩放。

In Photoshop, the solution is simple - adjust the vertical scaling.

有没有办法使用CSS做基本相同的事情?如果是,如何支持

Is there a way to do essentially the same thing using CSS? And if so, how well is it supported?

这里是一个 jsFiddle 的基本导航编码。

Here is a jsFiddle of the basic nav coding.

推荐答案

transform属性可用于缩放文本。

transform property can be used to scale text.

.menu li a    { color:#ffffff ;
text-transform:uppercase ;
text-decoration:none ;
font-family:"HelveticaNeue-Medium", sans-serif ;
font-size:14px ;
display: inline-block;
transform : scale(1,1.5);
-webkit-transform:scale(1,1.5); /* Safari and Chrome */
-moz-transform:scale(1,1.5); /* Firefox */
-ms-transform:scale(1,1.5); /* IE 9+ */
-o-transform:scale(1,1.5); /* Opera */
}

这篇关于是否可以使用CSS调整字体的垂直缩放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆