在 Bootstrap 3 中将页面宽度设置为最大 970px [英] Set the page width to max 970px within Bootstrap 3

查看:36
本文介绍了在 Bootstrap 3 中将页面宽度设置为最大 970px的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Bootstrap 3 构建一个在移动设备和台式机上显示良好的网站.客户告诉我页面的最大宽度只能是 970px.

I am using Bootstrap 3 to build a website that displays nicely on mobile devices and desktops. The customer tells me that the max width of a page can only be 970px.

如何使用 Bootstrap 3 执行此操作以确保:

How can I do this with Bootstrap 3 to make sure that:

  1. 页面仍以浏览器屏幕为中心?

  1. The page still centered in a browser screen?

Bootstrap 3 中所有伟大的东西都还在.

All the great things in Bootstrap 3 are still there.

推荐答案

Bootstrap 实际上在他们的网站上有一个较少的功能.此处,您可以选择要使用的引导程序组件.所有引导程序都具有响应性,因此您可以将大小更改为您想要的任何大小,并且所有内容都将继承.

Bootstrap actually have a less feature on their website. Here you can pick and choose what components of bootstrap you want to use. All of bootstrap is made to be responsive so you can change the size to be whatever you want and everything will inherit from that.

因此,如果您想将 .container 定义为 max-width: 970px,这可能符合您的目的.或者可能只是更改媒体查询断点.

So if you want to define .container as max-width: 970px that might serve your purposes. Or maybe just change the media query breakpoints.

只需看一看,您就可以在自定义部分为每个屏幕尺寸定义网格系统的尺寸.@container-sm、@container-md、@container-lg

Just took a look and you can define the size of your grid system for each screen size in the customize section. @container-sm, @container-md, @container-lg

第二次我忘记了我不久前收藏的这个资源.你可能会发现它很有用

这篇关于在 Bootstrap 3 中将页面宽度设置为最大 970px的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆