使用 Bootstrap 獲取警報中的連結


使用 .alert-link 實用程式 類可在任何警告中獲取匹配的彩色連結。

可以嘗試執行以下程式碼,在帶有 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 = "alert alert-success">
         <a href = "#" class = "alert-link">Success! Well done its submitted.</a>
      </div>
      <div class = "alert alert-info">
         <a href = "#" class = "alert-link">Information!</a>
      </div>
   </body>
</html>

更新時間:2020 年 6 月 12 日

247 次瀏覽

開啟你的 職業生涯

完成課程即可獲得認證

開始
廣告