自动更改文本大小 [英] To change automatically the text size

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

问题描述

大家好,

怎样才能让css文件自动更改

文本的文本大小相对于屏幕尺寸进入表格?


IE如果屏幕是800 x我希望文字大小= 10pt但是如果它是1024我

想要文字大小= 12 pt。

提前感谢

Peter

Hi at all,
how can I do to make a css file to change automatically the text size of the
text that is into a table relatively the screen size?

I.E. if the screen is 800 x I want the text size=10pt but if it is 1024 I
want the text size =12 pt.
Thank in advance
Peter

推荐答案

在29/9/04 10:28 am,Peter写道:
On 29/9/04 10:28 am, Peter wrote:
大家好,
如何制作一个css文件,自动更改相对于屏幕尺寸进入表格的文本文本大小?

IE如果屏幕是800 x我想要文本大小= 10pt但是如果它是1024我想要文本大小= 12 pt。
提前感谢
Peter
Hi at all,
how can I do to make a css file to change automatically the text size of the
text that is into a table relatively the screen size?

I.E. if the screen is 800 x I want the text size=10pt but if it is 1024 I
want the text size =12 pt.
Thank in advance
Peter




你想做什么?!?


即使你*做*知道屏幕大小是什么,它仍然没有''告诉你

它有多大。我这里有一台17英寸的显示器。目前它设置为
1280x1024,但只需点击鼠标,我就可以将其更改为640x480到1600x1200之间的任何地方。但它仍然可以测量17英寸。


这里有一个新颖的想法:将文字大小设置为100%并让访问者选择适合的尺寸。他们。


以你所描述的方式介入文字大小不会改善你的网站一点点。相信我。


Phil


-

Philip Ronan
ph *********** @ virgin.net

(如果通过电子邮件回复,请删除z。



What do you want to do that for?!?

Even if you *do* know what the screen size is, that still doesn''t tell you
how large it is. I''ve got a 17 inch monitor here. At the moment it''s set to
1280x1024, but with a click of the mouse I could change that to anywhere
between 640x480 and 1600x1200. But it will still measure 17 inches.

Here''s a novel idea: set the text size to 100% and let your visitors choose
a size that suits them.

Meddling about with text sizes in the way you described is not going to
improve your website one tiny bit. Trust me on that.

Phil

--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)


Peter写道:
Peter wrote:
我该怎么做才能css文件自动更改进入表格的文本大小相对于屏幕大小?
I.E.如果屏幕是800 x我希望文字大小= 10pt但是如果它是1024我想要文字大小= 12 pt。
how can I do to make a css file to change automatically the text size of the
text that is into a table relatively the screen size? I.E. if the screen is 800 x I want the text size=10pt but if it is 1024 I
want the text size =12 pt.




我不喜欢我不知道从哪里开始。


1)*你*可能想要那个大小的字体,但你的

网站的用户怎么样?他或她可能会使用更大的屏幕来获取更多信息,并且

你正在撤消他们的意愿。


pt对于屏幕显示来说是一个特别不合逻辑的选择,因为它是一个

物理测量(72pt = 1英寸)。这对你的字体意味着什么

on a 3" PDA屏幕或90英寸的屏幕投影屏?你怎么知道观看区域的物理尺寸

$

不要设置绝对字体大小,但要使用100%的相对尺寸作为

主要内容文字大小。这样,用户就可以获得他想要的字体大小。


2)屏幕宽度与浏览器窗口宽度不同。用户可能希望使用大屏幕并排放置多个窗口。


3)不要使用表格进行布局。 />

尽管如此,有一篇很棒的文章介绍了一种使用Javascript DOM操作将浏览器窗口宽度调整为b $ b布局的方法。这个

并不保证在所有浏览器上都能正常工作,但是很好的

增强:

http://www.themaninblue.com/writing/...ve/2004 / 09/21 /


我在我最新的网站项目中使用它:

http://step-by-step.org.uk/


如果您将窗口宽度减小到大约700px以下,标题布局

更改,菜单栏缩小,表格中的文字在

Prospectus中。页面缩小。


谨慎使用。修改字体大小会导致真正的

辅助功能问题。


-

Mark。
http://tranchant.plus.com/



I don''t know where to start.

1) *You* may want the font that size, but what about the user of your
site? He or she may use a larger screen to fit more information on, and
you are undoing their wishes.

pt is a particularly illogical choice for screen display, as it is a
physical measurement (72pt = 1 inch). What does that mean for your fonts
on a 3" PDA screen or a 90" projection screen? How do you even know the
physical size of the viewing area?

Don''t set absolute font sizes, but use relative sizing with 100% as the
main content text size. That way, the user gets the font size (s)he wants.

2) Screen width is not the same as browser window width. The user may
want to use a large screen to have multiple windows side by side.

3) Don''t use tables for layout.

Having said all of that, there is a great article on a method to adapt
layout to browser window width using Javascript DOM manipulation. This
isn''t guaranteed to work all the time on all browsers, but is a nice
enhancement:

http://www.themaninblue.com/writing/...ve/2004/09/21/

I use this on my latest site project:

http://step-by-step.org.uk/

If you reduce the window width below about 700px, the header layout
changes, the menu bar shrinks and the text in the table on the
"Prospectus" page shrinks.

Use with care and thought. Modifying font sizes can cause real
accessibility issues.

--
Mark.
http://tranchant.plus.com/


2004年9月29日星期三09:28:36 GMT,Peter写道:
On Wed, 29 Sep 2004 09:28:36 GMT, Peter wrote:
IE如果屏幕是800 x我希望文字大小= 10pt
I.E. if the screen is 800 x I want the text size=10pt




如果是你的浏览器,将字体大小设置为100%并使用

''缩放''功能可增加尺寸。 ..如果

它是*我的*浏览器,不要以为我全屏。


-

Andrew Thompson
http://www.PhySci.org/codes/ Web& IT帮助
http://www.PhySci.org/ 开源软件套件
http://www.1point1C.org/ Science&技术
http://www.lensescapes.com/ 图像逃脱世俗的



If it is your browser, set font size at 100% and use
the ''text zoom'' feature to increase size. ..And if
it is *my* browser, don''t presume I have it full screen.

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane


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

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