仅适用于Firefox的不同字体大小 [英] Different font size just for Firefox

查看:80
本文介绍了仅适用于Firefox的不同字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是为我的网站添加一个帐户标题,只显示玩家的用户名。

I am just adding a account header for my website, that just displays the players username.

我使用的是自定义字体,在chrome和IE上都可以正常工作,但是对于Firefox,它不显示自定义字体,而仅显示下一个可用的字体,即Verdana。我不介意,但是我的问题是Verdana字体的尺寸小于我的自定义字体,因此,如果我将其设置为7.5pt作为自定义字体,则自定义字体会显示两倍的尺寸。反正我可以只为Firefox设置更大的字体大小吗?

I am using a custom font and it works fine on chrome and IE, however for Firefox, it doesn't display the custom font and just displays the next available font which is Verdana. I don't mind that, however my problem is that the font Verdana is smaller in size than my custom font, so if i set it to 7.5pt as font size, the custom font appears twice the size. Is there anyway i can set the font size higher just for Firefox?

以下是用户名所在的div的CSS:

Here is the css for the div that the username is in:

font-size: 7.5pt;
color: #9f1717;
text-align: center;
font-family: xirod, xirodeot, Verdana, Geneva, sans-serif;


推荐答案

我建议使用Firefox支持的字体格式,或使用 font-size-adjust 获得不同字体系列的统一大小。

I suggest either using a font format that Firefox supports, or using font-size-adjust to get uniform sizes across different font families.

您可以使用 font-size-adjust 通过添加以下CSS:

You can use font-size-adjust by adding the following CSS:

font-size-adjust:0.5;

这会将所有字体设置为具有相同高度的小写字符(通常会产生文本当使用不同的字体查看时,看起来似乎更接近于相同的大小。

This will set all fonts to have approximately the same height lowercase characters (which, in general, produces text that appears to be closer to the same size when viewed with different fonts applied).

这篇关于仅适用于Firefox的不同字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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