什么是最佳替换< font size =" X">在CSS? [英] What is best replacement for <font size="X"> in CSS?
问题描述
我正在更新使用字体标签的旧网站,以使用CSS。旧HTML使用以下数字字体大小(1-7):
< font size =4>文字< / font>
什么是等效的CSS大小(在 px
p>来自W3C
http://www.w3.org/TR/html4/present/graphics.html#edef-FONT
size = cdata [CN]已弃用。
此属性设置字体的大小。可能的值:
- 1到7之间的整数。这将字体设置为某种固定大小,其呈现取决于用户代理。并非所有用户代理都可以
呈现所有七种尺寸。
- 字体大小相对增加。值+1表示一个大小。值-3意味着三个尺寸较小。所有尺寸都属于
,比例为1到7.
可以清楚地看到相当于大小的大或x大..等
解释:
< font size =3>
就像您使用 font-size :medium;
< font size =4>
就像你使用 font-size:large;
< font size = 5>
就像使用 font-size:x-large;
< font size =6>
就像使用 font-size:xx-large;
< font size =7>
$ c> font-size:-webkit-xxx-large;
/ p>
我想我第一次不是em的时候错了(虽然他们的工作类似)。请参阅更新:)
I am working on updating an old website which uses font tags, to use CSS. The old HTML uses numeric font sizes (1-7) like this:
<font size="4">Some text</font>
What are the equivalent CSS sizes (in px
, em
, etc.) for these legacy font tag sizes?
from W3C
http://www.w3.org/TR/html4/present/graphics.html#edef-FONT
size = cdata [CN] Deprecated.
This attribute sets the size of the font. Possible values:
- An integer between 1 and 7. This sets the font to some fixed size, whose rendering depends on the user agent. Not all user agents may
render all seven sizes.- A relative increase in font size. The value "+1" means one size larger. The value "-3" means three sizes smaller. All sizes belong to the scale of 1 to 7.
front this peice you could clearly see that equivalent to size will be large or x-large .. etc
explanation :
<font size="3">
is just as if you used font-size: medium ;
<font size="4">
is just as if you used font-size: large ;
<font size="5">
is just as if you used font-size: x-large ;
<font size="6">
is just as if you used font-size: xx-large ;
<font size="7">
is just as if you used font-size: -webkit-xxx-large;
update :
i think i have got it wrong the first time it's not em's (although they work similarly). please see the update :)
这篇关于什么是最佳替换< font size =" X">在CSS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!