我需要让我的网站适合屏幕 [英] I need to get my website to fit the screen

查看:79
本文介绍了我需要让我的网站适合屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将网站创建为固定布局,宽度为1600px, 但是分辨率较低的网页看起来太大. 我应该怎么做才能使它在每个分辨率下看起来都很好?

I have created my website as a fixed layout, with a width of 1600px, but the webpage on a smaller resolution looks too big. What am I supposed to do to make it looks good in every resolution?

感谢帮助

推荐答案

使用相对度量,例如width: 100%.您可以使用min-widthmax-width来进一步限制它.

Use relative measures, like width: 100%. You can constrain this even more by using min-width and max-width.

除此之外,您可以使用 CSS media queries 制作仅在满足某些条件时才适用的样式,例如最小或最大宽度.如果您使用它,则可以更改网站的整体外观,例如在较小的设备上隐藏部分内容,或者在较小的设备上将文本显示从2列更改为1列.

Apart from that, you can use CSS media queries to make styles that only apply if certain conditions are met, like a minimum or maximum width. If you use that, you can change the whole look and feel of your website, for instance by hiding parts on smaller devices or change from a 2 column to a 1 column text presentation on smaller devices.

这篇关于我需要让我的网站适合屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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