使用Bootstrap 4卡添加信息
要将信息添加到Bootstrap4中的卡上,请使用bg-info类。
将card类与bg-info类一起使用:
<div class="card bg-info">
之后使用card-body类添加卡体-
<div class="card-body"> Demo Text </div>
您可以尝试运行以下代码以添加信息-
示例
<!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">
<h3>Festival Celebration</h3>
<div class="card bg-info text-white">
<div class="card-body">Reach till 5PM</div>
</div>
</div>
</body>
</html>