对Bootstrap 4卡采取积极的行动
要对Bootstrap中的卡设置肯定/成功操作,请使用card-success类。
在这里,我已经设置了牌成功类,就像我们在<div>这样的任何元素上设置类一样。
<div class="card bg-success text-white"> <div class="card-body">Deal!</div> </div>
以相同的方式,设置其他成功消息-
<div class="card bg-success text-white"> <div class="card-body">Task complete!</div> </div>
让我们在Bootstrap4卡上实现成功操作-
示例
<!DOCTYPE html> <html> <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>Success Messages</h3> <div class="card bg-success text-white"> <div class="card-body">Deal!</div> </div><br> <div class="card bg-success text-white"> <div class="card-body">Cleared the 2nd round!</div> </div><br> <div class="card bg-success text-white"> <div class="card-body">Victory!</div> </div><br> <div class="card bg-success text-white"> <div class="card-body">Task complete!</div> </div> </div> </body> </html>