由于某些原因,当我从iPhone或移动设备上查看时,我的媒体查询不能正确调整我的网站的大小,因此我在iphone上获取了该网站的平板电脑版本。媒体查询适用于平板电脑,适用于缩小浏览器窗口的情况。媒体查询CSS
我错过了什么吗?
@media only screen and (min-width: 1024px) {
/*styling here*/
}
@media only screen and (max-width: 1023px) and (min-width: 740px) {
/*Tablet styling here*/
}
@media only screen and (max-width: 739px) and (min-width: 0px) {
/*Mobile styling here*/
}
看起来不错。您可以尝试LESS骨架样式表:http://lessframework.com/ – approxiblue 2012-07-19 12:39:40
确保移动浏览器想要提供移动版本的网站。如果用户选择不这样做,浏览器将使用更高的屏幕宽度并解析正常的样式表。 – 2012-07-19 12:41:14
尝试首先写入小型设备,然后获取更高分辨率并使用元视口。希望所有这些帮助你。 – SVS 2012-07-19 12:46:14