如何为Bootstrap 4卡创建页脚

要在Bootstrap 4卡中创建页脚,请使用card-footer类。

设置页脚-

<div class="card-footer">
  Footer message
</div>

由于页脚始终位于网页的底部,因此页脚类排在卡主体和卡页眉类之后。这是完整的代码-

<div class=”card”>
  <div class="card-header">Venue: 811, KY Road, New York</div>
  <div class="card-body">Timings: 9AM-11AM</div>
  <div class="card-footer">Reach before 9AM</div>
</div>

让我们看看如何在Bootstrap 4中创建卡页脚-

示例

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Bootstrap Example</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
  </head>

<body>
  <div class="container">
    <h2>Church Worship</h2>
    <div class="card">
      <div class="card-header">Venue: 811, KY Road, New York</div>
      <div class="card-body">Timings: 9AM-11AM</div>
      <div class="card-footer">Reach before 9AM</div>
    </div>
  </div>

</body>
</html>