设置带标题的 Bootstrap 面板
按照以下步骤将 Bootstrap 面板与标题一起设置:-
- 使用 .panel-heading 类将标题容器添加到面板。
- 使用任何 <h1>-<h6> 和 .panel-title 类来添加预设样式标题。
尝试运行以下代码以便 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 = "panel panel-default"> <div class = "panel-heading"> Tutorials </div> <div class = "panel-body"> Learn for free </div> </div> <div class = "panel panel-default"> <div class = "panel-heading"> <h3 class = "panel-title"> Quiz </h3> </div> <div class = "panel-body"> Attempt these quizzes </div> </div> </body> </html>
广告