气泡提示 纯CSS

tooltip(气泡提示)

依赖
脚本文件:CalvinTip.js
样式文件:toolTip.css
参数
  • elems
    HTMLNode
    必须

    气泡提示的元素

    options
    Object
    可选

    多选形式的可配置参数。

以下是option参数的说明

参数数据类型默认值说明
content string
null

气泡提示的文本

arrow string n

气泡提示的方向 n s w e

实例

    var tt = new calvin.ui.tooltip(document.getElementById("me"), { content: "提示文本!", arrow: "n" });
            var tt2 = new calvin.ui.tooltip(document.getElementById("Text1"), { content: "提示文本!", arrow: "w" });
            var tt2 = new calvin.ui.tooltip(document.getElementById("Text2"), { content: "提示文本!", arrow: "s" });
            $("#btnClose").click(function () { tt2.hide(); });
            $("#btnOpen").click(function () { tt2.show(); });

  


效果图:
如使用过程中有问题或者建议加QQ群14804593(入群请注明 博客园或者github) 或者下面回复。
原文地址:https://www.cnblogs.com/xuzhiwei/p/3586561.html