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

      <small id='FrGr4'></small><noframes id='FrGr4'>

      1. <legend id='FrGr4'><style id='FrGr4'><dir id='FrGr4'><q id='FrGr4'></q></dir></style></legend>
      2. <tfoot id='FrGr4'></tfoot>

        我将如何实现 stackoverflow 的悬停对话框?

        时间:2023-09-04

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

                <small id='US2Tf'></small><noframes id='US2Tf'>

                  <legend id='US2Tf'><style id='US2Tf'><dir id='US2Tf'><q id='US2Tf'></q></dir></style></legend>
                  本文介绍了我将如何实现 stackoverflow 的悬停对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我在 love 中使用 stackoverflow 的单色点击关闭"悬停对话框,当用户尝试投票但未登录时会向他们致意不正确地使用或使用该网站.知道 Jeff 如何和/或使用什么技术来实现这些整洁的小设备吗?

                  I am in love with stackoverflow's single-color "click-to-close' hovering dialog boxes that greet a user when they try to vote and aren't logged in or use the site incorrectly. Any idea how and/or what technology Jeff used to implement these neat little devices?

                  我特意说的是 SQUARE 对话框,上面写着单击以关闭".我知道如何实现屏幕顶部的矩形条.

                  推荐答案

                  虽然我的印象是他们为此使用了 jQuery 的 UI Dialog,但我不太确定了.但是,自己动手并不太难.试试这个代码:

                  Although I was under the impression they used jQuery's UI Dialog for this, I am not too sure anymore. However, it is not too difficult to whip this up yourself. Try this code:

                  $('.showme').click(function() {
                      $('.error-notification').remove();
                      var $err = $('<div>').addClass('error-notification')
                                           .html('<h2>Paolo is awesome</h2>(click on this box to close)')
                                           .css('left', $(this).position().left);
                      $(this).after($err);
                      $err.fadeIn('fast');
                  });
                  $('.error-notification').live('click', function() {
                      $(this).fadeOut('fast', function() { $(this).remove(); });
                  });
                  

                  使用这些样式:

                  .error-notification {
                      background-color:#AE0000;
                      color:white;
                      cursor:pointer;
                      display: none;
                      padding:15px;
                      padding-top: 0;
                      position:absolute;
                      z-index:1;
                      font-size: 100%;
                  }
                  
                  .error-notification h2 {
                      font-family:Trebuchet MS,Helvetica,sans-serif;
                      font-size:140%;
                      font-weight:bold;
                      margin-bottom:7px;
                  }
                  

                  点击这里查看它的实际效果.

                  但是,我认为您仍然需要对其进行一些调整,以根据您使用它的情况为其提供正确的位置.我为左边的位置处理了这个,因为它适用于顶部,但我认为在某些情况下它可能不会.考虑到所有因素,这应该可以帮助您入门.如果你想要一个更健壮的实现,你应该查看 jQuery BeautyTips 这真的很棒,而且实现起来很简单.

                  However, I think you'd still need to tweak it a little bit to give it the right positions depending on the situation in which you are using it. I took care of this for the left position because it is working for the top, but I think there may be some situations in which it won't. All things considered, this should get you started. If you want a more robust implementation, you should check out jQuery BeautyTips which is really awesome and would make this trivial to implement.

                  这篇关于我将如何实现 stackoverflow 的悬停对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:没有 jQuery 的模态对话框 下一篇:将异步 jQuery Dialog 更改为同步?

                  相关文章

                  最新文章

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

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

                      <bdo id='Nk7jp'></bdo><ul id='Nk7jp'></ul>
                      <legend id='Nk7jp'><style id='Nk7jp'><dir id='Nk7jp'><q id='Nk7jp'></q></dir></style></legend>