0

任何想法都会很好地解决这个问题。本质上它与子菜单的想法相同。

 $(".button").on({
    mouseenter: function (e) {
       //display my other div as a block element and fade it in
    },
    mouseleave: function () {
 //if my mouse leaves that block element then fade it out.
 }
});
4

1 回答 1

0

在你的 CSS 中设置另一个 divdisplay: none并使用 jQueryfadeIn()fadeOut()方法来打开/关闭它:

$(".button").on({
  mouseenter: function (e) {
    $(".other-div").fadeIn();
  },
  mouseleave: function () {
    $(".other-div").fadeOut();
  }
});

演示

于 2013-07-15T22:44:38.173 回答