我对我的 jquery 知识有点(更像是非常)生疏。出于某种原因,当绿色框悬停在上面时,我无法弄清楚我在这里缺少什么来使蓝色框消失。
剧本:
$(document).ready(function() {
$(".hover-text").hover({
$(".hover-hide").animate({
opacity: 0.4,
}, 500);
});
的HTML:
<div class="hover-hide">
<div class="hover-text">
BLAH
</div>
</div>
的CSS:
.hover-hide{
width:200px;
height:200px;
background-color:blue;
padding:30px;
}
.hover-text{
color:white;
background-color:green;
padding:10px;
width:auto;
margin-top:20px;
}
非常感谢!:)