在 Bootstrap 中使用蓝色背景色来模拟一个按下按钮的效果
要添加蓝色背景色以模拟按下按钮,请使用 Bootstrap 中的主按钮,如以下代码所示:-
示例
<!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script src = "/scripts/jquery.min.js"></script> <script src = "/bootstrap/js/bootstrap.min.js"></script> </head> <body> <div class = "container"> <h2>Score</h2> <button type = "button" class = "btn btn-primary">Result (2018)</button> <button type = "button" class = "btn btn-primary disabled">Result (2017)</button> </div> </body> </html>
广告