<div class="codetitle"> <span><a style="CURSOR: pointer" data="62363" class="copybut" id="copybut62363" onclick="doCopy('code62363')"><u>複製程式碼</u></a></span> 程式碼如下:</div> <div class="codebody" id="code62363"> <br><style type="text/css"> <BR>.content {width:500px;height:300px;position:absolute;left:200px;top:100px;border:solid 2px red;padding:10px;overflow:hidden} <BR>dl{width:400px; 1px solid black;} <BR></style> <br><div class="content"> <br><dl> <br><dt>測試資料1</dt> <br> </dl> <br><dl> <br><dt>檢定資料2</dt> <br> </dl> <br><dl> <br><dt>檢定資料3</dt> <br> </dl> <br><dl> <br><dt>檢定資料4</dt> <br> </dl> <br><dl> <br><dt>檢定資料5</dt> <br> <br><dl> <br><dt>測試資料6</dt> <br> </dl> <br><dl> <br><dt>測試資料7</dt> <br> </dl> <br><dl> <br><dt>測試資料8</dt> <br> </dl> <br><dl> <br><dt>測試資料9</dt> <br> </dl> <br><dl> <br><dt>測試資料10</dt> <br> </dl> <br> </dl> </div> <br><script type="text/ javascript" src="jquery.js"></script> <br><script type="text/javascript"> <BR>$(function(){ <BR>$('.content dl').hide( ); <BR>$('.content dl:gt(' ($('.content dl').length - 5) ')').show(); <BR>window.setInterval(function(){ <BR>$('.content dl:visible:first').prev().slideDown("fast",function(){ <BR>$(this).animate({opacity:1},2000,function() { <BR>if($('.content dl:hidden').length == 0){ <BR>$('.content dl').hide(); <BR>$('.content dl:gt (' ($('.content dl').length - 5) ')').show(); <BR>} <BR>}); <BR>}); <BR>},1000); <BR>}); <BR></script> <br> </div> <br>程式碼簡報網址: <br>http://www.nailyo.com/js_demo/gundong.html <br>