<http://jsfiddle.net/RBJ9R/1504/>
我希望mouseleave触发区域的大小增加以包含图像以及原始鼠标区域(灰色框)。我希望用户能够在鼠标悬停在图像区域时仍能看到图像。增加鼠标区域的大小
谢谢!
#slender-trigger {
background-color: #CCC;
height: 100px;
width: 120px;
margin-left: 0px;
margin-top: 50px;
position: absolute;
}
#slender {
font-family: 'Strait', sans-serif;
height: 400px;
width: 400px;
border: thin dotted #F00;
position: absolute;
margin-top: 50px;
margin-left: 120px;
display: none;
}
<div class="purchasing-tips">
<div id="slender-trigger">nnnn</div>
<div id="slender" style="background-image:url(http://lorempixel.com/120/100/people); height: 100px; width: 120px; border: 1px solid black;">sadfasdf</div>
</div>
$("#slender-trigger").on("mouseenter", function() {
$("#slender").show();
}).on("mouseleave", function() {
$("#slender").hide();
});
你能也在添加问题的代码?如果有什么事情发生在jsfiddle,那么很多其他用户看到这个帖子上SO寻找答案将沮丧 – matrixugly 2014-12-05 20:11:50
即时通讯新。我如何向条目添加代码?它一直阻止我。 – 2014-12-05 21:06:33
想通了.. – 2014-12-05 21:16:34