问题描述
我发现这个精彩的网站演示了你如何无法调整大小
使用样式格式化的文本,如果使用指定的字体大小,则为6 pt
单位,但如果您使用em指定字体大小,则可以。所以猜猜是什么...
我试过了,它在我的网站上没有用!
我所做的就是以下内容......
我改变了我的字体属性
..body {font-size:10pt}
对此
..body {font-size:1.2ems}
请记住我没有引用doctype dtd,I我不知道
如果这会有所作为。我所拥有的只是
中的第一个标签,代码是:<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01
Transitional // EN" ;>
现在我不完全确定我是否要在我的样式中切换测量单位
以适应调整大小。我首先想要调整
来进行工作,即在做出决定之前。我确实将我的字体设置为
关键字...即:小,中,大但是这些字体在不同的浏览器
可以通过doctype dtd进行记忆,这样可以避免出现怪异的问题
模式,但我想要比7个关键字更多的控制来描述字体大小。
大问题...我如何使用ems实现字体大小,以便他们可以在PC上重新调整大小?
请帮助
不要为主文本指定字体大小!
没有像ems这样的单位;。 " 2em的" +2em =" 4em"!
-
AGw。
" em"而不是ems而不是ems。如上所述。
请考虑只使用其中一种,而不是其中的1.2种。或者更好地使用
:使用字符大小的百分比,从而消除了某些版本的IE甚至em中的错误。调整错误。
body {font-size:100%; }
哦,在身体之前没有点。 (除非你定义了一个特定的类,
在这种情况下,''body'这个词是不合适的。)
1em或100%是每个人的默认尺寸。
-
-bts
-警告:我为草坪鹿刹车了/>
http://www.htmldog.com/articles/elasticdesign/demo/
I found this wonderful site the demonstrates how you cannnot resize
text formated using styles in ie 6 if you specify font size using pt
units but you can if you specify font size using em. So guess what...
I tried it and it on my site did not work!
All I did was the following...
I changed my font propery from this
..body { font-size: 10pt }
To this
..body { font-size: 1.2ems }
Keeping in mind that I am not referencing a doctype dtd, I don''t know
if this will make a difference or not. All I have for the first tag in
the code is this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
Now I am not entirely sure if I am going to switch measurement units
within my styles to accomodate resizing. I first want to get resizing
to work in ie before I make that decision. I did have my fonts set to
keywords... ie: small, medium and large but there was a descrepency on
the the size that these fonts got rendered in the different browsers
that can get rememied via a doctype dtd that will take ie out of quirks
mode but I want more control than 7 keywords to describe font size.
Big question... how do I implement font size using ems so that they can
resize in ie 6 on a pc?
Please helsp
Do not specify a font size for your main text!
There''s no such unit as "ems". "2em" + "2em" = "4em"!
--
AGw.
"em" rather than "ems" as mentioned.
Do consider using just one of them, rather than 1.2 of them though. Or
better yet: use percentages for font sizes, thus eliminating the bug in
some versions of IE where even "em" resizes incorrectly.
body { font-size: 100%; }
Oh, and no dot before ''body''. (Unless you''ve defined a specific class,
in which case the word ''body'' is not appropriate.)
1em or 100% is everyone''s default size.
--
-bts
-Warning: I brake for lawn deer
这篇关于如何使用ems实现字体大小,以便它们可以在PC上调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!