ブートストラップでマウスオーバープロンプトを設定する方法

爱喝马黛茶的安东尼
リリース: 2019-07-13 17:17:40
オリジナル
4393 人が閲覧しました

ブートストラップでマウスオーバープロンプトを設定する方法

1、

<button type="button" rel="drevil" data-content="报名截止时间:&#39;+time+&#39;" data-container="body" data-toggle="popover" 
data-placement="bottom"></button>
ログイン後にコピー

2、

$(function () { $("[data-toggle=&#39;popover&#39;]").popover(); });    
    $("[rel=drevil]").popover({
                      trigger:&#39;manual&#39;,
                      //placement : &#39;bottom&#39;, //placement of the popover. also can use top, bottom, 
                      left or right
                      //天title : &#39;<div style="text-align:center; color:red; text-decoration:underline; 
                      font-size:14px;"> Muah ha ha</div>&#39;, //this is the top title bar of the popover. 
                      add some basic css
                      html: &#39;true&#39;, //needed to show html of course
                      //content : &#39;<div id="popOverBox"><img src="http://www.hd-report.com/wp-content
                      /uploads/2008/08/mr-evil.jpg" width="251" height="201" /></div>&#39;, //this is the 
                      content of the html box. add the image here or anything you want really.
                      animation: false
                  }).on("mouseenter", function () {
                      var _this = this;
                      $(this).popover("show");
                      $(this).siblings(".popover").on("mouseleave", function () {
                          $(_this).popover(&#39;hide&#39;);
                      });
                  }).on("mouseleave", function () {
                      var _this = this;
                      setTimeout(function () {
                          if (!$(".popover:hover").length) {
                              $(_this).popover("hide")
                          }
                      }, 300);
                  });
ログイン後にコピー

関連する推奨事項:「bootstrap 入門チュートリアル

以上がブートストラップでマウスオーバープロンプトを設定する方法の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

関連ラベル:
ソース:php.cn
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
最新の問題
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!