我想完成的效果很简单,
当 mouseover 到 d1时,d2显示出来,
现在d2可以显示出来,
但是当鼠标移动到d2上时会闪一下(先隐藏再显示)。问题出在那里呢?
ps:d2在d1层之上。
jquery $(document).ready(function(){ $("#d1").mouseover(function(){ $("#d2").fadeIn(); $("#d2").mouseover(function(){ $(this).show(); }) }) $("#d1").mouseout(function(){ $("#d2").fadeOut(); }) }) #d1{ width:500px;height:500px;position:absolute;top:100px;background:#222; } #d2{width:100px;height:100px;position:absolute;top:100px;background:red;display:none;}