Bootstrap响应式导航已停止在移动设备上工作;平板电脑屏幕尺寸

时间:2014-04-29 10:14:05

标签: javascript css wordpress twitter-bootstrap-3

我一直在使用bootstrap3创建一个站点,并且下拉菜单与正确的CSS样式完美配合。我没有更改任何代码,但移动视图和平板电脑视图导航现在没有样式,只显示在列表视图中 - 请参阅:http://creative-media.info/FatLossPro/

我不确定这是怎么发生的;我没有修改代码并恢复到最后的工作副本。导航在过去的两周内一直运行良好。我还重新上传了JS文件夹和CSS文件以及function.php,以确保没有文件被错误保存,损坏或包含任何缺少的元素。

任何有关wordpress中的bootstrap3导航问题的帮助都会非常感激(平板电脑和移动视图不再有效 - 没有CSS样式)

1 个答案:

答案 0 :(得分:0)

喜欢此媒体查询。

/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-width : 320px)
and (max-width : 480px) {
/* Styles */
}

/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
/* Styles */
}

/* Smartphones (portrait) ----------- */
@media only screen
and (max-width : 320px) {
/* Styles */
}

/* iPads (portrait and landscape) ----------- */
@media only screen
and (min-width : 768px)
and (max-width : 1024px) {
/* Styles */
}

/* iPads (landscape) ----------- */
@media only screen
and (min-width : 768px)
and (max-width : 1024px)
and (orientation : landscape) {
/* Styles */
}

/* iPads (portrait) ----------- */
@media only screen
and (min-width : 768px)
and (max-width : 1024px)
and (orientation : portrait) {
/* Styles */
}

/* Desktops and laptops ----------- */
@media only screen
and (min-width : 1224px) {
/* Styles */
}

/* Large screens ----------- */
@media only screen
and (min-width : 1824px) {
/* Styles */
}

/* iPhone 4 ----------- */
@media
only screen and (-webkit-min-device-pixel-ratio : 1.5),
only screen and (min-device-pixel-ratio : 1.5) {
/* Styles */
}