根据分辨率更改字体大小 [英] Change font size according to resolution

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

问题描述

你好


i我正在组建一个网站,我想在所有屏幕分辨率上几乎完全相同。


99%元素具有%宽度和高度,而不是px测量值。所以这不是问题。


我遇到的问题是字体大小。


有没有人知道使用的最佳代码改变了根据屏幕resoluiton进行fontsize?

malc

hello

i am putting together a web site that i would like to be virtually identical in all screen resolutions.

99% of the elements have % widths and height, rather than px measurements. so this is not the problem.

the problem i have is with font sizes.

does anyone know the best code to use change the fontsize according to the screen resoluiton?

malc

推荐答案

使用更小/更大或百分比 - 参见此链接


是这是一个JavaScript问题?
Use smaller/larger or a percentage - see this link.

Is this a JavaScript problem?


好吧,我想在找到window.screen.width / height后我需要编写一个javascript来更改fontsize。
well, i thought i would need to write a javascript to change the fontsize after finding the window.screen.width/height.


我已经更改了我的css文件中字体大小的百分比,但是在较低的分辨率中,文本(在本例中为链接)位于div的底部(在这种情况下是侧边栏)


i知道这不是一个javascript概率,但不是真的想要在其他地方开始一个新的线程。


是不是没有聪明的方式根据res大小,可以对文本进行大小调整?
i have changed the % of the font size in my css file, but in the lower resolutions the text(in this case, links) go of the bottom of the div(which in this case is a sidebar)

i know this is not neccesarily a javascript prob, but don''t really want to have to start a new thread elsewhere.

is there not a clever way that the text can be clerverly resized depending on the res size?


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

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