简体   繁体   English

更改引导容器 div 的宽度

[英]Change the width of bootstrap container div

I would like to change the.container div width in bootstrap 4. The original css is this:我想更改 bootstrap 4 中的.container div 宽度。原来的 css 是这样的:

@media (min-width: 1200px)
.container {
    max-width: 1160px;
}

If i add this code below to my file, would it cause any problems, or everything will be okay?如果我将下面的代码添加到我的文件中,它会引起任何问题,还是一切都会好起来的?

    @media (min-width: 1920px)
.container {
    max-width: 1360px;
}

You can change most of the default settings/values in bootstrap but remember that if you change them you might lose the responsive layout which Bootstrap provides it to you, but the answer is Yes you can and it is all about your own project.您可以更改 bootstrap 中的大多数默认设置/值,但请记住,如果您更改它们,您可能会失去 Bootstrap 为您提供的响应式布局,但答案是肯定的,您可以,这完全取决于您自己的项目。

If you don't sure you can change only a container called it with ID and then do changes to that one only.如果您不确定,您只能更改一个名为 ID 的容器,然后只对那个容器进行更改。

Always refer back to documentation that Bootstrap provided.始终参考 Bootstrap 提供的文档。

enter link description here 在此处输入链接描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM