如何在Bootstrap 4中将第二列移到屏幕中央,将第三列移到屏幕底部?

时间:2019-01-26 16:01:28

标签: html5 twitter-bootstrap css3 bootstrap-4

一节中有3列。该部分具有屏幕的整个高度。第一栏在最上面。但是其他2列不在应有的位置。我需要将第二列移到屏幕的中心,将第三列移到屏幕的底部。我正在使用Bootstrap4。这也是代码:

.full-screen {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-size: cover;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>


<section #section class='full-screen'>
  <div class="row h-100">
    <div class="col-md-12">
      <h2 class="logo float-left">Logo</h2>
      <button class=" submit-btn sign-up float-right">Sign Up</button>
      <button class=" submit-btn sign-in float-right">Sign In</button>
    </div>
    <div class="col-md-12 text-center justify-content-center">
      <h1 class="heading">Lorem Ipsum!</h1>
    </div>
    <div class="col-md-12 text-center">
      <button class="btn btn-circle"></button>
      <button class="btn btn-circle"></button>
      <button class="btn btn-circle"></button>
      <h4>email</h4>
    </div>
  </div>
</section>

0 个答案:

没有答案