Bootstrap 3响应式桌面和移动设备布局 [英] Bootstrap 3 responsive desktop and mobile layout
问题描述
使用bootstrap 3设计我的响应式网站,我无法使布局在低于1366px v 786px的桌面宽度分辨率下工作.当布局减小到1024px时,它被认为是移动断点.
Using bootstrap 3 to design my responsive website, I'm having trouble getting the layout to work below a desktop width resolution of 1366px v 786px. When the layout is decreased down to 1024px, it is considered the mobile breakpoint.
如何控制布局从桌面切换到移动布局的时间?
How can I control when the layout switched from desktop to mobile layout?
这是我的html
<body>
<div class="container-fluid">
<div class="container-fluid header">
<div id="container">
</div>
</div>
<div class="row-fluid">
<div class="col-lg-3">
<div class="well">
</div>
</div>
<div class="col-lg-9">
<div class="col-lg-6">
<div class="title">
<h3>title 1</h3>
</div>
</div>
<div class="col-lg-6">
<div class="title">
<h3>title 2</h3>
</div>
</div>
</div>
</div>
</div>
推荐答案
row-fluid
和container-fluid
在BS 3中已弃用,因此现在只使用container
和row
The row-fluid
and container-fluid
are deprecated from BS 3, so now you just use container
and row
您可以使用新的小型"网格类(col-sm-*
)来防止布局在较小的显示器上堆叠..
You can use the new "small" grid classes (col-sm-*
) to prevent the layout from stacking on smaller display..
<div class="container">
<div class="row">
<div class="col-lg-3 col-sm-3">
<div class="well">
</div>
</div>
<div class="col-lg-9 col-sm-9">
<div class="col-lg-6 col-sm-6">
<div class="well">
</div>
</div>
<div class="col-lg-6 col-sm-6">
<div class="well">
</div>
</div>
</div>
</div>
</div>
如果您希望它甚至在最小的显示器上也永远不会堆叠,请使用较小的col-xs-*
网格类.
If you want it to never stack, even on the smallest displays, use the tiny col-xs-*
grid classes.
这篇关于Bootstrap 3响应式桌面和移动设备布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!