復(fù)制代碼 代碼如下:
<script src="js/Jquery1.7.js"></script>
<script type="text/javascript">
$(function () {
$('div:eq(1)').css({ 'margin-top': '-=100px' });
$('div:first').mouseover(function () {
$('div:eq(1)').animate({'margin-top':'+=100px'});
})
$('div:first').mouseout(function () {
$('div:eq(1)').animate({ 'margin-top': '-=100px' });
})
</script>
復(fù)制代碼 代碼如下:
<pre><div>
<div>
</div>
<div>
</div>
</div></pre><br>
<pre></pre>
<pre></pre><pre>當(dāng)把鼠標(biāo)移動(dòng)到盒子上的時(shí)候上面就會(huì)出現(xiàn)一個(gè)黑色的盒子</pre><pre>這是在瀏覽網(wǎng)頁的時(shí)候看到的一個(gè)效果</pre><pre>在這里寫了一下</pre>
新聞熱點(diǎn)
疑難解答
圖片精選