使用 Bootstrap 使元素不可見


要使用 Bootstrap 使元素不可見,請使用 invisible 類。

你可以嘗試執行以下程式碼來隱藏元素 −

示例

動態演示

<!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>Cricket Boards</h2>
         <p>The <abbr title = "International Cricket Council">ICC</abbr> governs cricket boards.</p>
         <p class = "invisible">BCCI is also governed by ICC. (This element is invisible)</p>
      </div>
   </body>
</html>

更新日期: 12-06-2020

229 瀏覽量

開啟你的職業生涯

完成課程即可獲得認證

開始學習
廣告