更改 Bootstrap 容器的最大宽度

Ara*_*raw 5 bootstrap-4

我正在使用 Bootstrap 4 制作登录页面。使用 Bootstrap 的容器的最大宽度似乎是 1140px?我的显示器现在是 1920px。我是否必须将 bootstrap 的值覆盖为 1920px 才能使其支持该尺寸的显示器?

这是我使用的代码,我想将登录表单的内容居中(代码仅用于测试以将内容居中):

<body>
<div class="container h-100 d-flex justify-content-center">
    <div class="jumbotron my-auto">
      <h1 class="display-3">Hello, world!</h1>
    </div>
</div>
</body>
Run Code Online (Sandbox Code Playgroud)

或者甚至对于更大的显示器,我是否应该将尺寸增加到疯狂的高(如 999999px)以支持它们?

感谢您的任何反馈!

Web*_*ter 6

只需使用container-fluid类而不是container获得全宽。

在您的情况下,更好的选择是使用像这样的流体超大屏幕:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

<div class="jumbotron jumbotron-fluid">
  <div class="container">
    <h1 class="display-4">Fluid jumbotron</h1>
    <p class="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

带有上述container课程的流畅超大屏幕是一个不错的选择,因为它可以确保宽 4K 屏幕上的用户不会生你的气。:-)