jquery實(shí)現(xiàn)盒子下拉效果示例代碼
更新時(shí)間:2013年09月12日 17:27:28 作者:
當(dāng)把鼠標(biāo)移動(dòng)到盒子上的時(shí)候上面就會(huì)出現(xiàn)一個(gè)黑色的盒子,這是在瀏覽網(wǎng)頁(yè)的時(shí)候看到的一個(gè)效果,具體實(shí)現(xiàn)如下,感興趣的朋友可以了解下
復(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 name="code" class="html"><div style="width:600px;height:300px;overflow:hidden;">
<div style="background-color:#000;height:100px;">
</div>
<div style="background-color:#eee;height:300px;">
</div>
</div></pre><br>
<pre></pre>
<pre name="code" class="html"></pre><pre name="code" class="html">當(dāng)把鼠標(biāo)移動(dòng)到盒子上的時(shí)候上面就會(huì)出現(xiàn)一個(gè)黑色的盒子</pre><pre name="code" class="html">這是在瀏覽網(wǎng)頁(yè)的時(shí)候看到的一個(gè)效果</pre><pre name="code" class="html">在這里寫(xiě)了一下</pre>
相關(guān)文章
javascript中對(duì)Attr(dom中屬性)的操作示例講解
這篇文章主要是對(duì)javascript中對(duì)Attr(dom中屬性)的操作進(jìn)行了詳細(xì)的介紹,需要的朋友可以過(guò)來(lái)參考下,希望對(duì)大家有所幫助2013-12-12jQuery制作簡(jiǎn)潔的多級(jí)聯(lián)動(dòng)Select下拉框
省市多級(jí)聯(lián)動(dòng)的select下拉框有很多種實(shí)現(xiàn)方式,度娘上隨便一搜就一大堆,今天我們來(lái)討論的這款特效,代碼卻很簡(jiǎn)潔,兼容性也非常棒,推薦給大家。2014-12-12Jquery倒數(shù)計(jì)時(shí)按鈕setTimeout的實(shí)例代碼
這篇文章介紹了Jquery倒數(shù)計(jì)時(shí)按鈕setTimeout的實(shí)例,有需要的朋友可以參考一下2013-07-07