<div class="codetitle"> <span><a style="CURSOR: pointer" data="41460" class="copybut" id="copybut41460" onclick="doCopy('code41460')"><u>复代码码</u></a></span> 代码如下:</div> <div class="codebody" id="code41460"> <br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 전환//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <br><html xmlns="http://www.w3.org/1999/xhtml" > <br><머리> <br><title>제목 없는 페이지</title> <br><link rel="Stylesheet" type="text/css" href="Result-Css/reset/reset-min.css" /> <br><style type="text/css"> <br>.w_con{ 너비:400px; 높이:160px; 오버플로:숨김; 테두리:1px 솔리드 #333;} <br>#w_slid{ 너비:100%;} <br>#w_slid li{ 너비:100%; 높이:40px;} <br>li.a{ 배경:#ffc000;} <br>li.b{ 배경:#56aaff;} <br>li.c{ 배경:#0fffaa;} <br>li.d { 배경:#0ffffa;} <br>li.e{ 배경:#ffff56;} <br></style> <br><script type="text/javascript" src="Result-JavaScriptOrJQuery/jquery/jquery-1.7.2.js"></script> <br></head> <br><본문> <br><div class="w_con" id="w_con"> <br><ul id="w_slid"> <br><li class="a"></li> <br><li class="b"></li> <br><li class="c"></li> <br><li class="d"></li> <br><li class="e"></li> <br></ul> <br></div> <br><script type="text/javascript"> <br>함수 슬라이드() { <br>var $w_slid = $('#w_con'); <br>console.log($w_slid); <br>var 타이머; <br>$w_slid.hover(function(){ <br>clearInterval(Timer); <br>},function(){ <br>Timer = setInterval(function(){ <br>slideFadeIn($w_slid); <br>},3000); <br>}).trigger("mouseleave"); <br>} <br>function SlideFadeIn(obj) { <br>var $self = obj.find('ul:first'); <br>var $height = $self.find('li:first').height(); <br>console.log($height); <br>$self.animate({ <br>'marginTop': $height 'px', <br>}, 1200, function () { <br>$self.css({ marginTop: 0 }).find( "li:first").appendTo($self); <br>$self.find("li:first").hide() <br>$self.find("li:first").fadeIn(" 천천히"); <br>}); <br>} <br>$(function () { <br>slide(); <br>}); <br></script> <br></body> <br></html> <br> </div>