字体大小起始大小 [英] font-size starting size

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

问题描述

您好,

我刚刚加入这个小组并看到了讨论您如何看待

将1em调整为10px?我有点困惑的是你们认为应该用什么作为参考大小的


我很惊讶有人真的建议使用ems作为参考。 Ems

相对于选定的点大小,宽度以大写字母M为单位。

如果没有给出点大小,它们的大小是多少?浏览器

显然必须决定。

另外,将正文设置为62.5%是愚蠢的。 %是什么?我应该

*假设* 16像素?不好的想法。而不是我使用浏览器的经验。


使用像素根本不能很好地扩展。

17"文本看起来很大。 800x600显示器,相当小的20英寸显示器1600x1200或17 1400x1050。

我们的网站最近从使用硬编码像素设置更改为

分配默认正文大小(以磅为单位)并使用%来设置其他

大小向上或向下。它在不同的物理尺寸和分辨率的显示上具有更一致的外观。

我使用的是font-size = 11pt。定义参考尺寸(在我的显示器上

这里约为16像素)。当然,这不是很准确;它取决于

浏览器和显示系统决定什么代表1点

(1/72英寸)。


毕竟那......基本字体的优良做法是什么?

尺寸?


-

在sohnen-MOE科网

JMM破折号列表(用于电子邮件删除.TRSPAMTR)

解决方案
詹姆斯萌< JM ***************@sohnen-moe.com>写道:

我刚加入这个组


欢迎。现在请阅读精美的常见问题解答。

Ems
是相对于选定的点大小,宽度以点数为单位。


你根本就错了。 em单位表示字体的大小,

与任何宽度都没有明确的关系。

如果没有给出点大小,它们的大小是多少?


阅读常见问题解答。

浏览器显然必须决定。


不,用户。

另外,将正文设置为62.5%是愚蠢的。


当然。

我用的是font-size = 11pt定义参考大小




你忽略了它,对吗?或者你使用了破碎的浏览器?

-

Yucca, http://www.cs.tut.fi/~jkorpela/


2004年6月4日22:格林尼治标准时间53:07,James Moe< jm *************** @ sohnen-moe.com>

写道:

Ems相对于选定的点大小,宽度以点数为单位。如果没有给出点大小,它们的大小是多少?
浏览器显然必须决定。


em在CSS中与print em不同。在任何固有的调整之后,它是默认大小

的典型字符。 1em相当于

100%。


Ex。 p {font-size:1.5em}表示p元素文本将是

默认值的150%。


但是:body {font-size: 110%} p {font-size:0.911em}表示p回来了

到100%左右。

还将正文设置为62.5%,好吧,愚蠢。 %是什么?


无论用户在浏览器中设置了他喜欢的字体大小,或者

默认大小(如果尚未设置)。

我应该*假设* 16像素?不好的想法。而不是我使用
浏览器的经验。


我同意。假设一个特定的像素大小是不明智的。

那么毕竟......什么被认为是基础
字体大小的好习惯?



完全没有设置,或者在body元素中使用100%或更大。这允许浏览器以用户喜欢的大小呈现文本,如果他设置了

首选项,或者是默认设置,该用户应该非常

曾经。


Neal< ne ***** @ yahoo.com>写道:

" em"在CSS中与print em不同。


这是相同的概念:字体的大小。

这是任何固有调整后的典型字符的默认大小。




我想知道所有这些关于em的误解源于何处。典型角色的高度

比em小_much,并且

个字符的宽度自然会有所不同,而且它们通常_much_小于

em。 em单位不表示任何特定字符的任何尺寸,

或字符的任何平均尺寸。


-

Yucca, http://www.cs.tut.fi/~jkorpela/


Hello,
I just joined this group and saw the discussion "What do you think of
resizing 1em to 10px?" I am somewhat confused by what y''all think should be
used as a reference size.
I was surprised that someone actually suggested ems as a reference. Ems
are relative to a selected point size, the width in points of a capital M.
If no point size is given, what size does an em become? The browser
obviously must decide.
Also setting the body text to 62.5% is, well, stupid. % of what? I should
*assume* 16 pixels? Bad thinking. And not my experience with browsers.

Using pixels does not scale very well at all. Text look quite large on a
17" 800x600 monitor, and quite small on a 20" 1600x1200 or 17" 1400x1050.
Our site recently changed from using hard-coded pixel settings to
assigning a default body text size in points and using % to set the other
sizes up or down. It has a more consistent look that way on displays of
different physical dimensions and resolutions.
I used "font-size=11pt" to define the reference size (which on my display
here is about 16 pixels). It is, of course, not very exact; it depends on
the browser and the display system to decide on what represents 1 point
(1/72 inch).

So after all that.... What is considered good practice for the base font
size?

--
jmm dash list at sohnen-moe dot com
(Remove .TRSPAMTR for email)

解决方案

James Moe <jm***************@sohnen-moe.com> wrote:

I just joined this group
Welcome. Now please read the fine FAQs.
Ems
are relative to a selected point size, the width in points of a
capital M.
You''re fundamentally wrong. The em unit denotes the size of the font,
which has no defined relationship with any width.
If no point size is given, what size does an em become?
Read the FAQ.
The browser obviously must decide.
No, the user.
Also setting the body text to 62.5% is, well, stupid.
Of course.
I used "font-size=11pt" to define the reference size



And you got it ignored, right? Or did you use a broken browser?
--
Yucca, http://www.cs.tut.fi/~jkorpela/


On 4 Jun 2004 22:53:07 GMT, James Moe <jm***************@sohnen-moe.com>
wrote:

Ems are relative to a selected point size, the width in points of a
capital M. If no point size is given, what size does an em become? The
browser obviously must decide.
The "em" in CSS is not identcal to the print em. It is the default size of
a typical character after any inhereted adjustments. 1em is equivalent to
100%.

Ex. p {font-size:1.5em} means the p element text will be 150% of the
default.

However: body {font-size: 110%} p {font-size: 0.911em} means the p is back
to 100% or so.
Also setting the body text to 62.5% is, well, stupid. % of what?
Of whatever the user has set his preferred font size in the browser, or
the default size if it hasn''t been set.
I should *assume* 16 pixels? Bad thinking. And not my experience with
browsers.
I agree. Assuming a particular pixel size is unwise.
So after all that.... What is considered good practice for the base
font size?



Nothing set at all, or use 100% or larger in the body element. This lets
the browser render the text at the size the user prefers, if he has set a
preference, or at the default setting, which that user should be quite
used to.


Neal <ne*****@yahoo.com> wrote:

The "em" in CSS is not identcal to the print em.
It is the same concept: the size of the font.
It is the default
size of a typical character after any inhereted adjustments.



I wonder where all this misunderstandings about em stem from. The height
of a typical character is _much_ smaller than em, and the widths of
characters naturally vary, and they too are typically _much_ smaller than
em. The em unit does not denote any dimension of any specific character,
or any average dimension of characters.

--
Yucca, http://www.cs.tut.fi/~jkorpela/


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

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