【发布时间】:2013-03-19 03:22:55
【问题描述】:
我正在使用 wordpress 中的自定义主题,我想在从移动设备查看时添加某些格式(最小 320 像素 - 最大 400 像素)
元标记:
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
css:
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
.logo{margin-left:0px !important}
.content{width:100% !important; }
.mainmenu {background:rgba(0,0,0,0.6) !important; }
.mainmenu li{padding:0 5px !important;}
.mainmenu li a{font-size:18px !important; font-family:'impactregular' !important; color:#000 !important;}
}
@media only screen
and (min-width : 1000px) {
.logo{float:left;}
}
现在由于某种原因,它检测到 1000 像素,但没有检测到更小的..不确定我在这里做错了什么。
这是我要修复的网站的link。提前致谢。
【问题讨论】:
-
将 min-device-width 更改为 min-width 并将 max-device-width 更改为 max-width
标签: wordpress responsive-design media-queries