使用類 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.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"> <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