创建一个Bootstrap 4卡头
要在Bootstrap4中创建卡标题,请使用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>让我们看一个例子来学习如何创建Bootstrap4卡头-
示例
<!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>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>热门推荐
10 医院探望朋友祝福语简短
11 毕业祝福语简短女朋友
12 春节虎年爸妈祝福语简短
13 儿童毕业祝福语 简短6
14 开工仪式横幅祝福语简短
15 孩子日常祝福语大全简短
16 清晨寄语诗句祝福语简短
17 结婚送亲认亲祝福语简短
18 虎年喝酒拜年祝福语简短