Bootstrap 4 .card-footer 类
在 Bootstrap 4 中使用 card-footer 类设置 Bootstrap 卡片页脚。
使用该类添加 −
<div class="card-footer"> Add footer message here </div>
card-footer 类紧跟在 card-header 和 card-body 类后面 −
<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://ajax.googleapis.com/ajax/libs/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>
广告