使用 Bootstrap 為元素新增綠色背景色以設定積極的操作
使用 Bootstrap 中的 .btn-success 類來為一個元素設定積極的操作。你可以嘗試執行以下程式碼來實現 .btn-success 類 −
示例
<!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/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.1/js/bootstrap.min.js"></script> </head> <body> <p>The following are FMCG companies:</p> <div class = "btn-default"> <button type = "button" class = "btn btn-primary">ITC Limited</button> <button type = "button" class = "btn btn-primary">Nestle</button> <button type = "button" class = "btn btn-primary">Britannia Industries Limited</button> </div> <p>Click below if the above list is correct:</p> <button type = "button" class = "btn btn-success">Success</button> </body> </html>
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 語言程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP