• <bdo id='jESao'></bdo><ul id='jESao'></ul>
      <tfoot id='jESao'></tfoot>
      <i id='jESao'><tr id='jESao'><dt id='jESao'><q id='jESao'><span id='jESao'><b id='jESao'><form id='jESao'><ins id='jESao'></ins><ul id='jESao'></ul><sub id='jESao'></sub></form><legend id='jESao'></legend><bdo id='jESao'><pre id='jESao'><center id='jESao'></center></pre></bdo></b><th id='jESao'></th></span></q></dt></tr></i><div id='jESao'><tfoot id='jESao'></tfoot><dl id='jESao'><fieldset id='jESao'></fieldset></dl></div>

      1. <small id='jESao'></small><noframes id='jESao'>

        <legend id='jESao'><style id='jESao'><dir id='jESao'><q id='jESao'></q></dir></style></legend>

        layui中添加上下文提示弹窗功能

        时间:2024-08-13

        <tfoot id='40Gu2'></tfoot>
        <legend id='40Gu2'><style id='40Gu2'><dir id='40Gu2'><q id='40Gu2'></q></dir></style></legend>

      2. <small id='40Gu2'></small><noframes id='40Gu2'>

        1. <i id='40Gu2'><tr id='40Gu2'><dt id='40Gu2'><q id='40Gu2'><span id='40Gu2'><b id='40Gu2'><form id='40Gu2'><ins id='40Gu2'></ins><ul id='40Gu2'></ul><sub id='40Gu2'></sub></form><legend id='40Gu2'></legend><bdo id='40Gu2'><pre id='40Gu2'><center id='40Gu2'></center></pre></bdo></b><th id='40Gu2'></th></span></q></dt></tr></i><div id='40Gu2'><tfoot id='40Gu2'></tfoot><dl id='40Gu2'><fieldset id='40Gu2'></fieldset></dl></div>
                <tbody id='40Gu2'></tbody>

              • <bdo id='40Gu2'></bdo><ul id='40Gu2'></ul>

                  html部分代码:
                  <p  context-tip="自定义上下文提示信息">段落内容...</p>
                  <div  context-tip="自定义上下文提示信息">div内容...</div>
                  js代码部分:
                  // 悬浮提示
                  $("body").on("mouseenter", "*[context-tip]",  function () {
                      var content = $(this).attr('context-tip');
                      this.index = layui.layer.tips('<div style="padding: 0px; font-size: 14px; color: #eee;">' + content + '</div>', this, {
                          time: -1
                          , maxWidth: 280
                          , tips: [3, '#3A3D49']
                      });
                  });
                   
                  $("body").on("mouseleave", "*[context-tip]", function () {
                      layui.layer.close(this.index);
                  });
                   
                  
                  最终实现的效果如下图所示:

                  上一篇:layui复选框如何向后台传值接值 下一篇:没有了

                  相关文章

                  <tfoot id='ZF05d'></tfoot>
                  <legend id='ZF05d'><style id='ZF05d'><dir id='ZF05d'><q id='ZF05d'></q></dir></style></legend>

                  <i id='ZF05d'><tr id='ZF05d'><dt id='ZF05d'><q id='ZF05d'><span id='ZF05d'><b id='ZF05d'><form id='ZF05d'><ins id='ZF05d'></ins><ul id='ZF05d'></ul><sub id='ZF05d'></sub></form><legend id='ZF05d'></legend><bdo id='ZF05d'><pre id='ZF05d'><center id='ZF05d'></center></pre></bdo></b><th id='ZF05d'></th></span></q></dt></tr></i><div id='ZF05d'><tfoot id='ZF05d'></tfoot><dl id='ZF05d'><fieldset id='ZF05d'></fieldset></dl></div>
                    <bdo id='ZF05d'></bdo><ul id='ZF05d'></ul>

                  1. <small id='ZF05d'></small><noframes id='ZF05d'>