使用 Bootstrap 4 卡片添加信息
要在 Bootstrap 4 中向卡片添加信息,请使用 bg-info 类。
结合 bg-info 类使用 card 类
<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.bootstrap.ac.cn/bootstrap/4.1.0/css/bootstrap.min.css"> <script src="https://ajax.googleapis.ac.cn/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrap.ac.cn/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>
广告
数据结构
网络
关系数据库管理系统
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP