因為對JQ和JS不熟悉,所以不知道如何實現(xiàn)漸隱或一個過渡的效果。我做的是隱藏顯示DIV標簽的代碼。<script>jQuery(function () {jQuery('#ullist li').hover(function () { jQuery('.d1', this).hide();jQuery('.d2', this).show(); },function () { jQuery('.d2', this).hide(); jQuery('.d1', this).show(); })jQuery('#ullist li').hover(function () { jQuery('.d1', this).hide(); jQuery('.d2', this).show(); },function () { jQuery('.d2', this).hide(); jQuery('.d1', this).show(); })});</script><ul id="ullist"><li><div class="d1">D1DIV里的內(nèi)容</div><div class="d2">D2DIV里的內(nèi)容</div></li></ul>不是鼠標移動到D1上去后,顯示D2,隱藏D1,然后從D2上移開鼠標隱藏D2顯示D1?,F(xiàn)在就想做個漸隱的效果,請問如何能夠做到?先謝謝了!~
- 3 回答
- 0 關注
- 496 瀏覽
添加回答
舉報
0/150
提交
取消