建立載入程式 4 卡片標題
要在 Bootstrap 4 中建立卡片標題,請使用 card-header 類。使用 − 類在卡片內部設定標題
<div class="card-header"> Product List </div>
新增標題後,再新增卡片正文,如以下程式碼段所示 −
<div class="card-header">Product List</div> <div class="card-body"> <p class="card-text">Product One</p> <p class="card-text">Product Two</p> </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://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>Products</h2> <div class="card"> <div class="card-header">Product List</div> <div class="card-body"> <p class="card-text">Product One</p> <p class="card-text">Product Two</p> </div> <div class="card-footer"> This was the list of products in stock. </div> </div> </div> </body> </html>
廣告
資料結構
網路
關係型資料庫管理系統
作業系統
Java
iOS
HTML
CSS
Android
Python
C 語言程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP