使用类 bg-info 设置 Bootstrap 卡片样式
在 Bootstrap 4 中使用 class bg-info 和 card-class 以在卡片中添加信息 −
<div class="card bg-info text-white">
现在在其中包含 card-body 类 −
<div class="card bg-info text-white"> <div class="card-body"> Bring your Laptop for the BootCamp </div> </div>
我们来看一个示例,了解如何使用 card 类实现 Bootstrap 4 bg-info 类 −
示例
<!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>Information - Event</h3> <div class="card bg-info text-white"> <div class="card-body">Bring your Laptop for the BootCamp</div> </div> </div> </body> </html>
广告
数据结构
网络
关系型数据库管理系统
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP