0

所以我遇到了一些麻烦,鼠标悬停工作但我需要更多的东西,当背景改变时它必须删除它的内容。

#Test01{
background: url(../img/Test01.png);
float: left;
display: block;
height: 297px;
width: 319px;
} 
#Test01:hover {
background: url(../img/Test01hover.png);
}

<div id="Test01"><div id="test01content">lot's of bla bla bla bla bla</div></div>

所以当它鼠标悬停时,这个带有内容的 div 应该消失了。

谢谢

4

2 回答 2

0

不要使用 CSS,而是尝试使用 Javascript 来实现它,

$("#Test01").hover(function(){
   $(this).css("background-image", "url(../img/Test01hover.png)")
   $(this).empty();
});
于 2013-01-31T09:52:53.043 回答
0

尝试使用 jQuery

$("#Test01").mouseover(function(){
   $(this).empty();
});
于 2013-01-31T10:02:49.520 回答