最快的方式使网站响应? [英] Fastest Way to Make Website Responsive?
问题描述
我使用Zurb基金会和骨架之前,所以我熟悉两个,但我从来没有必要转换现有的网站以前的响应网站。转换我的网站最快的方法是什么?使用上述框架,或者为已提供的代码添加媒体查询?
I've used Zurb Foundation and Skeleton before so I'm familiar with both but I never had to convert an existing website to a responsive website before. Whats the quickest method to convert my website? Using a framework like above, or adding Media Queries for the code already provided? (Does that even work?)
推荐答案
确定要支持哪些设备,然后添加一个样式表,其中包含以下内容:
Determine which devices you want to support and then add a stylesheet with something along these lines:
/* =Responsive Structure
----------------------------------------------- */
@media (max-width: 800px) {
/* Smaller Resolution Desktops and Laptops */
[...]
}
@media (max-width: 650px) {
/* Smaller devices */
[...]
}
@media (max-width: 450px) {
/* Even Smaller devices */
[...]
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
/* Even Smaller devices */
[...]
}
最简单的方法是测试他们是否按降序排列。更多范例媒体查询:
It's easiest to test if they go in descending order. more example media queries here:
http://css-tricks.com/snippets/css/media-queries-for-standard-devices/
这篇关于最快的方式使网站响应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!