使用 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 次浏览

开启你的 职业生涯

完成课程即可获得认证

开始
广告
© . All rights reserved.