鼠标点击
<button class="btn tips" data-type="click" data-title="我是提示文字1">Left</button> <button class="btn btn-blue tips" data-type="click" data-align="top" data-title="我是提示文字2">Top</button> <button class="btn btn-red tips" data-type="click" data-align="right" data-title="我是提示文字3">Right</button> <button class="btn btn-yellow tips" data-type="click" data-align="bottom" data-title="我是提示文字4">Bottom</button> <button class="btn btn-green tips" data-type="click" data-align="bottom-left" data-pic="https://www.sdcms.cn/upfile/2017/05/1494075936753.jpg" data-title="我是提示文字4">Image</button>

提示
<button class="btn tips" data-title="我是提示文字1">Left</button> <button class="btn btn-blue tips" data-align="top" data-title="我是提示文字2">Top</button> <button class="btn btn-red tips" data-align="right" data-title="我是提示文字3">Right</button> <button class="btn btn-yellow tips" data-align="bottom" data-title="我是提示文字4">Bottom</button> <button class="btn btn-green tips" data-align="bottom-left" data-pic="https://www.sdcms.cn/upfile/2017/05/1494075936753.jpg">Image</button> <button class="btn tips" data-align="bottom-left" data-title="我是提示文字5">Bottom-Left</button> <button class="btn tips" data-align="top-left" data-title="我是提示文字6">Top-Left</button> <button class="btn tips" data-align="right-top" data-width="10rem" data-title="我是提示文字711111111111111111111111111111111111111111111111">Right-Top</button>

自定义宽度
<button class="btn tips" data-width="10rem" data-align="top" data-title="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbb">Top</button> <button class="btn tips" data-width="10rem" data-align="right" data-title="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbb">Right</button> <button class="btn tips" data-width="10rem" data-align="bottom" data-title="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbb">Bottom</button> <button class="btn tips" data-width="10rem" data-align="left" data-title="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbb">Left</button>

通过JS调用


<input id="mytips1"><br><br> <input id="mytips2"> <script> $(function(){ $.tips({ 'text':'请输入提示域名', 'id':'#mytips1', 'align':'bottom-left' }); $.tips({'text':'请输入提示域名','id':'#mytips2','align':'right-top'}) }) </script>