Bootstrap基本外掛程式學習筆記之Popover提示框(19)_javascript技巧

來源:互聯網
上載者:User

Tooltip採用的是hover方式彈出提示框(參見前一篇:Bootstrap學習總結筆記(18)– 基本外掛程式之Tooltip提示工具),適合提示內容比較少的情況,要是內容較多,就可以應用Popover提示框。

<!DOCTYPE html><html lang="zh-cn"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="../../css/bootstrap.min.css" rel="stylesheet"> <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script> <script src="../../js/bootstrap.min.js"></script> <title>Popover提示彈出框</title></head><body><div class="container"> <div class="page-header"> <h1>Popover提示彈出框</h1> </div> <div> <button type="button" class="btn btn-default" data-toggle="popover" data-placement="left" title="popover left" data-content="測試">左邊的按鈕</button> <button type="button" class="btn btn-primary" data-toggle="popover" data-placement="right" title="popover right" data-content="測試">左邊的按鈕</button> <button type="button" class="btn btn-danger" data-toggle="popover" data-placement="top" title="popover top" data-content="測試">左邊的按鈕</button> <button type="button" class="btn btn-warning" data-toggle="popover" data-placement="bottom" title="popover bottom" data-content="測試">左邊的按鈕</button> </div></div><script> $(function () { $("[data-toggle='popover']").popover(); })</script></body></html>

效果如下:

如果大家還想深入學習,可以點擊這裡進行學習,再為大家附3個精彩的專題:

Bootstrap學習教程

Bootstrap實戰教程

Bootstrap外掛程式使用教程

以上就是本文的全部內容,希望對大家的學習有所協助,也希望大家多多支援雲棲社區。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.