web建站教程
  1. 首页
  2. vuejs
  3. js
  4. 地图大全
  5. AIGC工具
  6. 前端知识
  7. 百度echarts
  8. 更多
    php入门
    nodejs
    mockjs
    reactjs
    mysql
    wordpress
    织梦cms
    帝国cms
    git教程
    IT知识
    模板大全
    休息站
    手机应用

bootstrap如何实现鼠标悬停显示提示信息

1522 ℃

bootstrap如何实现鼠标悬停显示提示信息,下面web建站小编给大家详细介绍一下具体代码!

html代码:

<button type="button" rel="drevil" data-content="具体时间:'+time+'" 
data-container="body" data-toggle="popover" data-placement="bottom"></button>

js代码:

$(function () { $("[data-toggle='popover']").popover(); });    
$("[rel=drevil]").popover({
  trigger:'manual',
  //placement : 'bottom', //placement of the popover. also can use top, bottom, left or right
  //天title : '<div style="text-align:center; color:red; text-decoration:underline; font-size:14px;"> Muah ha ha</div>',
  html: 'true', //needed to show html of course
  //content : '<div id="popOverBox"></div>', //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('hide');
  });
}).on("mouseleave", function () {
  var _this = this;
  setTimeout(function () {
    if (!$(".popover:hover").length) {
       $(_this).popover("hide")
    }
  }, 300);
});

全球最受欢迎的前端开源工具库——Bootstrap v4中文文档

如何利用bootstrap做一个年月日的时间选择器

bootstrap框架如何实现拖拽效果

bootstrap图片轮播功能如何停止自动轮播

如何利用bootstrap做一个下拉菜单功能

标签: bootstrap 提示信息

上面是“bootstrap如何实现鼠标悬停显示提示信息”的全面内容,想了解更多关于 前端知识 内容,请继续关注web建站教程。

当前网址:https://ipkd.cn/webs_3406.html

声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

当前位置: 网站首页 > 前端知识
本文共计929个字,预计阅读时长7分钟
Trae:新一代免费的AI编程工具

在线育儿补贴计算器

快来看看你到底可以领到多少补贴!

生活小工具

收录了万年历、老黄历、八字智能排盘等100+款小工具!生活小工具
上一篇: 推荐一款宝藏型工具应用类网站——一个木匣
下一篇: 推荐一款拥有江西情怀的免费可商用字体——江西拙楷体
x 打工人ai神器