媒体查询和适应现成的网站 [英] media queries and to adapt the ready made site

查看:65
本文介绍了媒体查询和适应现成的网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我不得不调整我的当前网站以适应更小的桌面屏幕尺寸。它可以在所有屏幕上看到,只有像14这样的小屏幕才能看到,它在左侧创建了一个滚动条,并且不是必需的。

他们要求我缩小一切可能以适应14的网站,但仍然是可见的,就像它出现时屏幕较大。有人可以帮我处理这个问题吗?不,iphone屏幕不是一种选择,只有不同的桌面屏幕,特别是小屏幕。



您能否告诉我应该改变什么? 您可以要么改变当前的样式表,以便它可以在较小的设备上工作(14不是 em> small,所以这可能是一个不错的选择),这将是一个简单的方法来摆脱滚动条。 编写一个单独的样式表适用于仅限某些设备,并使用媒体查询来定位您想要的设备(例如使用 min-width max-width 表达式)。这意味着您可以尽可能多地调整小设备的样式表只要你喜欢,并没有冒险打破大型设备的页面。




PhoneGap 就是一个很好的例子,你可以在调整屏幕大小时改变样式表。


I am now having to adjust my current site to fit it into a smaller desktop screen size. It is viewable on all screens, only with smaller ones like 14", it creates a scrollbar on the left and is not required.

They ask me to scale down everything possible to fit the site into 14" but still to be viewable like when it appears with larger screen sizes. Someone could help me deal with this ? And No, iphone screen is not an option, only different desktop screens, especially the small ones.

Could you advise what I should change ?

解决方案

You can either:

  • Alter your current stylesheet so that it works on smaller devices (14" isn't that small, so this might be a good option). This would be a simple way to get rid of the scrollbar.

  • Write a separate stylesheet that applies only to certain devices, and use media queries to target the devices you want (for example using the min-width, max-width expressions). This means you can tweak the stylesheet for smaller devices as much as you like and not risk breaking the page for larger devices.

PhoneGap is a good example of a website who's stylesheet changes as you resize the screen.

这篇关于媒体查询和适应现成的网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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