css - 移动设备的 Twitter Bootstrap 和最大宽度?

标签 css mobile twitter-bootstrap responsive-design

我想在 320px 上为移动设备设置固定分辨率 - 我希望我的网站看起来始终与 the screen for 320px 上的一样.

我试过在 320px 上设置固定宽度,像这样:

@media (max-width: 320px) {
    body {
        width: 320px;
    }
}

但是这段代码对我不起作用。有什么办法吗?

最佳答案

您可以在您的 html 中使用元标记。

<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=320, height=device-height, target-densitydpi=medium-dpi" />

关于css - 移动设备的 Twitter Bootstrap 和最大宽度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15397217/

相关文章:

html - 单击控件时轮播效果不起作用

html - 图像 slider 过度滚动

javascript - 检测像素比/密度的最佳实践是什么?

iphone - 向 iPhone 发送全屏、消失的短信

javascript - 移动 chrome 上的动画滞后

javascript - 下拉菜单在 Firefox 中运行良好,但在 Chrome 中不可靠

html - Bootstrap 的推拉类不起作用?

css - 不需要的垂直滚动条

html - 如何在使用 ScrollMagic 向下滚动后到达页面末尾时才显示页脚?

html - 使用 <use> 将填充更改为 svg