qtip2:http://qtip2.com/

bower install qtip2 // lowercase!

引入一个css和插件即可。

<script type="text/javascript" src="/path/to/jquery.qtip.js"></script>

如果需要更多的支持,则引入相应的扩展。

qtip2下面后里面有个basic文件夹,里面的文件和外面文件名相同,但内容不同。

外面的js包含了插件Plugins: tips modal viewport svg imagemap ie6,。

而basic下面的没有包含插件。

样式:

/* Basic styles */
.qtip-light{} /* Light coloured style */
.qtip-dark{} /* Alternative dark style */
.qtip-cream{} /* Cream-esque style, similar to the default */
.qtip-red{} /* Alert-ful red style */
.qtip-green{} /* Positive green style */
.qtip-blue{} /* Informative blue style */ /* CSS3 styles */
.qtip-rounded{} /* CSS3 border-radius class for applying rounded corners to your tooltips */
.qtip-shadow{} /* CSS3 box-shadow class for applying shadows to your tooltips */
.qtip-bootstrap{} /* Twitter Bootstrap style */
.qtip-youtube{} /* Google's new YouTube style */
.qtip-tipsy{} /* Minimalist Tipsy style */
.qtip-tipped{} /* Tipped libraries "Blue" style */
.qtip-jtools{} /* jTools tooltip style */
.qtip-cluetip{} /* Good ole' ClueTip style */

http://qtip2.com/guides

使用方法:

JavaScript String

If you just want a common piece of text shared between all your tooltips, you can supply qTip2  directly with a JavaScript String

$('a').qtip({ // Grab some elements to apply the tooltip to
content: {
text: 'My common piece of text here'
}
})

(等同于:

$('.selector').qtip({ content: 'My content' });

)

title attribute

If you plan on using qTip2  as simply a very thin replacement of the browser tooltips, the title attribute is a great way to do so. It's standards compliant, it's the expected place for tooltip text, and the plugin will automaically look there for its content if none is given inside your .qtip({ ... }) config object!

$('[title]').qtip(); // Grab all elements with a title attribute, and apply qTip!
$('[title!=""]').qtip(); // A bit better. Grab elements with a title attribute that isn't blank.

This is the simplest method of using qTip2 , as it requires very little setup and works to replace existing, native tooltips auto-magically!

使用参考:

http://blog.csdn.net/smartsmile2012/article/details/17169443

最新文章

  1. MVC架构学习之Smarty学习——病来而蔫
  2. WordPaster-Chrome浏览器控件安装方法
  3. linux操作系统的分类及解释
  4. Android下实现GPS定位服务
  5. android调用系统自带的的浏览器搜索关键字
  6. 【枚举+数学】【HDU1271】整数对 难度:五颗星
  7. 【框架学习与探究之消息队列--EasyNetQ(2)】
  8. dbForge Studio for MySQL V8.0 Enterprise
  9. C#获取一个数组中的最大值、最小值、平均值
  10. da5_模块
  11. UVa 10870 Recurrences (矩阵快速幂)
  12. 调用百度api输出地址和城市查询出具体坐标系
  13. mac 安装 tomcat 配置
  14. vue-页面回退
  15. ASP.NET Web Api vs Node.js Benchmark
  16. Python爬虫入门 之 如何在豆瓣中获取自己喜欢的TOP N电影信息
  17. Python菜鸟之路:Django Admin后台管理功能使用
  18. Dll劫持漏洞详解
  19. C和指针之学习笔记(2)
  20. linux中uptime命令获取主机运行时间和查询系统负载信息

热门文章

  1. python中的argv使用
  2. shell之使用paste命令按列拼接多个文件
  3. 使用shell删除目录下几天前生成文件方法
  4. linux:基本指令ls、cd
  5. flannel
  6. JAVA中的array是通过线性表还是链表实现的呢?
  7. Google 的 OKR 制度与KPI 有什么不同?
  8. 半屏控制器,view: UIViewController+KNSemiModal
  9. 【Python爬虫】BeautifulSoup网页解析库
  10. Ext.app.Application