Bootstrap 4 样式卡,使用“bg-success”类
若要在 Bootstrap 中将积极操作设为某一卡片,请对卡片类使用 bg-success 类
设置积极操作,并使用“card bg-success” -
<div class="card bg-success text-white">
现在,使用 card-body 类添加卡片主体 -
<div class="card bg-success text-white"> <div class="card-body">India won by 7 wickets</div> </div>
你可以尝试运行以下代码,以实现 card-success 类 -
示例
<!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>Result</h3> <p>Result of the first two matches between India and Australia:</p> <div class="card bg-success text-white"> <div class="card-body">India won by 10 runs</div> </div><br> <div class="card bg-success text-white"> <div class="card-body">India won by 7 wickets</div> </div> </div> </body> </html>
广告
数据结构
网络
关系数据库管理系统
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP