使用Bootstrap 4中的card-footer类设置Bootstrap卡的页脚。
使用类添加它-
<div class="card-footer"> Add footer message here </div>
卡页脚类紧随卡头和卡体类之后-
<div class="card"> <div class="card-header">Details</div> <div class="card-body">Timings: 4PM - 8PM</div> <div class="card-footer">Reach before 4PM</div> </div>
您可以尝试运行以下代码来实现card-footer类-
<!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>Conference</h2> <div class="card"> <div class="card-header">Details</div> <div class="card-body">Timings: 4PM - 8PM</div> <div class="card-footer">Reach before 4PM</div> </div> </div> </body> </html>