这是一个图片切换的效果,我想在图片切换的时候加点效果应该如何做,还有要在鼠标离开这个区域之后如何让它显示默认的第一张图片<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>图片切换</title>
</head>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
background-color: #B1B2B4;
background-image: url(images/bg.jpg);
background-repeat: repeat-x;
margin-right: 0px;
margin-bottom: 0px;
}
body,td,th {font-family: Verdana, Geneva, sans-serif;font-size: 12px;}
ul{ padding:0 0; margin:0 0;}
li{ list-style: none; margin:0 0; padding:0 0;}
#cont{ width:1004px; padding:0 0; margin:0 0;}
#change_pic{ width:719px; height:231px; background:#FDF0E0 url(images/ex_index_04.jpg) left top no-repeat; overflow:hidden; padding:3px 0 5px 3px;}
#change_btn{ width:138px; height:232px; overflow:hidden; float:left;}
#change_btn li{ margin-top:2px;background:#FFF;WIDTH: 138px; height:56px; text-align:center;CURSOR: pointer;}
#change_btn .current {BACKGROUND:#D22425;}
#change_btn img{ margin-top:3px;}
#notop{ margin-top:0px;}
#change_piclist {overflow:hidden;width:578px;height:230px; float:left; margin-left:3px; margin-top:2px;}
#change_piclist LI {OVERFLOW: hidden; WIDTH: 578px; HEIGHT: 230px}
#change_piclist IMG {WIDTH: 578px; HEIGHT: 230px; border:0;}
#change_piclist .normal {DISPLAY: none}
-->
</style>
<script language="javascript" type="text/javascript">
function $d(A){return document.getElementById(A)}
function classNormal(a,b){
var c=$d(a).getElementsByTagName("li");
var d=$d(b).getElementsByTagName("li");
for(var e=0;e<d.length;e++){
c[e].className="normal";
d[e].className="normal";
}
}
function classCurrent(A,C,F){
var E=$d(A).getElementsByTagName("li");
var B=$d(C).getElementsByTagName("li");
E[F].className="current";
F=F-1;
B[F].className="current";
}
function FocusChange(){
if(!$d("change_pic")){return false}
var A=$d("change_btn").getElementsByTagName("li");
A[0].onmouseover=function(){
classNormal("change_piclist","change_btn");
classCurrent("change_piclist","change_btn",1)
};
A[1].onmouseover=function(){
classNormal("change_piclist","change_btn");
classCurrent("change_piclist","change_btn",2)
};
A[2].onmouseover=function(){
classNormal("change_piclist","change_btn");
classCurrent("change_piclist","change_btn",3)
};
A[3].onmouseover=function(){
classNormal("change_piclist","change_btn");
classCurrent("change_piclist","change_btn",4)
};
}
</script>
<body>
<div id="change_pic">
<div id="change_btn">
     <ul>
         <li class="normal"><IMG src="http://ce-sunway.com/nimg/s10.jpg" ></li>
            <li class="normal"><IMG src="http://ce-sunway.com/nimg/s13.jpg" ></li>
            <li class="normal"><IMG src="http://ce-sunway.com/nimg/s15.jpg" ></li>
            <li class="normal"><IMG src="http://ce-sunway.com/nimg/s17.jpg" ></li>
        </ul>    
    </div>
    <DIV id="change_piclist">
<UL>
<LI class="current"><A href="#"><IMG alt="" src="http://ce-sunway.com/nimg/01.jpg"></A> </LI>
            <LI class="normal"><A href="#"><IMG alt="" src="http://ce-sunway.com/nimg/02.jpg"></A> </LI>
<LI class="normal"><A href="#"><IMG alt="" src="http://ce-sunway.com/nimg/03.jpg"></A></LI>
<LI class="normal"><A href="#"><IMG alt="" src="http://ce-sunway.com/nimg/04.jpg"></A></LI>
    <LI class="normal"><A href="#"><IMG alt="" src="http://ce-sunway.com/nimg/05.jpg"></A></LI>
</UL>
</DIV>
</div>
<SCRIPT type=text/javascript>FocusChange();</SCRIPT>
</body>
</html>

解决方案 »

  1.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>图片切换 </title> 
    </head> 
    <style type="text/css"> 
    <!-- 
    body { 
    margin-left: 0px; 
    margin-top: 0px; 
    background-color: #B1B2B4; 
    background-image: url(images/bg.jpg); 
    background-repeat: repeat-x; 
    margin-right: 0px; 
    margin-bottom: 0px; 

    body,td,th {font-family: Verdana, Geneva, sans-serif;font-size: 12px;} 
    ul{ padding:0 0; margin:0 0;} 
    li{ list-style: none; margin:0 0; padding:0 0;} 
    #cont{ width:1004px; padding:0 0; margin:0 0;} 
    #change_pic{ width:719px; height:231px; background:#FDF0E0 url(images/ex_index_04.jpg) left top no-repeat; overflow:hidden; padding:3px 0 5px 3px;} 
    #change_btn{ width:138px; height:232px; overflow:hidden; float:left;} 
    #change_btn li{ margin-top:2px;background:#FFF;WIDTH: 138px; height:56px; text-align:center;CURSOR: pointer;} 
    #change_btn .current {BACKGROUND:#D22425;} 
    #change_btn img{ margin-top:3px;} 
    #notop{ margin-top:0px;} 
    #change_piclist {overflow:hidden;width:578px;height:230px; float:left; margin-left:3px; margin-top:2px;} 
    #change_piclist LI {OVERFLOW: hidden; WIDTH: 578px; HEIGHT: 230px} 
    #change_piclist IMG {WIDTH: 578px; HEIGHT: 230px; border:0;} 
    #change_piclist .normal {DISPLAY: none} 
    --> 
    </style> 
    <script language="javascript" type="text/javascript"> 
    function $d(A){return document.getElementById(A)} 
    function classNormal(a,b){ 
    var c=$d(a).getElementsByTagName("li"); 
    var d=$d(b).getElementsByTagName("li"); 
    for(var e=0;e <d.length;e++){ 
    c[e].className="normal"; 
    d[e].className="normal"; 


    function classCurrent(A,C,F){ 
    var E=$d(A).getElementsByTagName("li"); 
    var B=$d(C).getElementsByTagName("li"); 
    E[F].className="current"; 
    F=F-1; 
    if(F>=0)
    B[F].className="current"; 

    function FocusChange(){ 
    if(!$d("change_pic")){return false} 
    var A=$d("change_btn").getElementsByTagName("li"); 
    A[0].onmouseover=function(){ 
    classNormal("change_piclist","change_btn"); 
    classCurrent("change_piclist","change_btn",1) 
    }; 
    A[1].onmouseover=function(){ 
    classNormal("change_piclist","change_btn"); 
    classCurrent("change_piclist","change_btn",2) 
    }; 
    A[2].onmouseover=function(){ 
    classNormal("change_piclist","change_btn"); 
    classCurrent("change_piclist","change_btn",3) 
    }; 
    A[3].onmouseover=function(){ 
    classNormal("change_piclist","change_btn"); 
    classCurrent("change_piclist","change_btn",4) 
    }; 
    } function abc(){ 
    classNormal("change_piclist","change_btn"); 
    classCurrent("change_piclist","change_btn",0) 
    }
    </script> 
    <body> 
    <div id="change_pic" onmouseout="abc()"> 
    <div id="change_btn"> 
        <ul> 
            <li class="normal"> <IMG src="http://ce-sunway.com/nimg/s10.jpg" > </li> 
                <li class="normal"> <IMG src="http://ce-sunway.com/nimg/s13.jpg" > </li> 
                <li class="normal"> <IMG src="http://ce-sunway.com/nimg/s15.jpg" > </li> 
                <li class="normal"> <IMG src="http://ce-sunway.com/nimg/s17.jpg" > </li> 
            </ul>    
        </div> 
        <DIV id="change_piclist"> 
    <UL> 
    <LI class="current"> <A href="#"> <IMG alt="" src="http://ce-sunway.com/nimg/01.jpg"> </A> </LI> 
                <LI class="normal"> <A href="#"> <IMG alt="" src="http://ce-sunway.com/nimg/02.jpg"> </A> </LI> 
    <LI class="normal"> <A href="#"> <IMG alt="" src="http://ce-sunway.com/nimg/03.jpg"> </A> </LI> 
    <LI class="normal"> <A href="#"> <IMG alt="" src="http://ce-sunway.com/nimg/04.jpg"> </A> </LI> 
        <LI class="normal"> <A href="#"> <IMG alt="" src="http://ce-sunway.com/nimg/05.jpg"> </A> </LI> 
    </UL> 
    </DIV> 
    </div> 
    <SCRIPT type=text/javascript>FocusChange(); </SCRIPT> 
    </body> 
    </html>只做了离开返回第一张.效果不知道要的是啥.不过其实用JQ实现就很简单.
      

  2.   

    你这种方法我用过了,不是要的这个效果。是离开整个区域(包括大图和小图)之后返回第一张图片。在页面里面是有问题的不过我刚刚在打字的时候想到一个思路就是让各个层相互重合这样这样不知道能不能达到这种效果。特效是随便的(JQ我从来没有用过)。惭愧的是我到现在JQ的代码还没有看过。天天忙得头晕,也没有时间看这个。
      

  3.   

    回到默认图片的我已经做好了,求:如何给图片间的切换加上特效。。我要兼容大部分浏览器的。能够做成迅雷首页的上下滑动效果也可以。
    完整的源代码:急求加上特效的效果。
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>图片切换</title>
    </head>
    <style type="text/css">
    <!--
    body {margin-left: 0px;margin-top: 0px;background-color: #B1B2B4;background-image: url(images/bg.jpg);background-repeat: repeat-x;margin-right: 0px;margin-bottom: 0px;}
    body,td,th {font-family: Verdana, Geneva, sans-serif;font-size: 12px;}
    ul{ padding:0 0; margin:0 0;}
    li{ list-style: none; margin:0 0; padding:0 0;}
    #cont{ width:1004px; padding:0 0; margin:0 0;}
    #change_pic{ width:722px; height:241px; background:#FDF0E0 url(images/ex_index_04.jpg) left top no-repeat; overflow:hidden; padding:0 0; position:relative;}
    #change_btn{ width:138px; height:231px; overflow:hidden; float:left;}
    #change_btn li{background:#FFF;WIDTH: 138px; height:56px; margin-bottom:2px; text-align:center;CURSOR: pointer;}
    #change_btn .current {BACKGROUND:#D22425;}
    #change_btn img{ margin-top:3px; border:0;}
    #notop{ margin-top:0px;}
    #change_piclist {overflow:hidden;width:578px;height:231px; float:left; margin-left:3px;}
    #change_piclist LI {OVERFLOW: hidden; WIDTH: 578px; HEIGHT: 231px}
    #change_piclist IMG {WIDTH: 578px; HEIGHT: 230px; border:0;}
    #change_piclist .normal {DISPLAY: none}
    #change_def1{ width:722px; height:5px; line-height:4px; font-size:4px; overflow:hidden;}
    #change_def3{ clear:both; width:722px; height:5px; line-height:5px; font-size:3px; overflow:hidden;}
    #change_def2{ width:3px; height:231px; font-size:3px; overflow:hidden; float:left;}
    #change_cent{ width:719px; height:231px;float:left;}
    -->
    </style>
    <script language="javascript" type="text/javascript">
    //图片切换的一个效果
    //版权归属 http://www.52tbz.cn  斯文书生
    function $d(A){return document.getElementById(A)}
    function classNormal(a,b){
    var c=$d(a).getElementsByTagName("li");
    var d=$d(b).getElementsByTagName("li");
    for(var e=0;e<d.length;e++){
    c[e].className="normal";
    d[e].className="normal";
    }
    }
    function classCurrent(a,b,c){
    var d=$d(a).getElementsByTagName("li");
    var e=$d(b).getElementsByTagName("li");
    d[c].className="current";
    if (c>0){
    c=c-1;
    e[c].className="current";
    }
    }
    function FocusChange(){
    if(!$d("change_pic")){return false}
    for(var i=1;i<4;i++){
    var P=$d("change_def"+i);
    P.onmouseout=function(){
    classNormal("change_piclist","change_btn");
        classCurrent("change_piclist","change_btn",0)
    };
    }
    var A=$d("change_btn").getElementsByTagName("li");
    A[0].onmouseover=function(){
    classNormal("change_piclist","change_btn");
    classCurrent("change_piclist","change_btn",1)
    };
    A[1].onmouseover=function(){
    classNormal("change_piclist","change_btn");
    classCurrent("change_piclist","change_btn",2)
    };
    A[2].onmouseover=function(){
    classNormal("change_piclist","change_btn");
    classCurrent("change_piclist","change_btn",3)
    };
    A[3].onmouseover=function(){
    classNormal("change_piclist","change_btn");
    classCurrent("change_piclist","change_btn",4)
    };
    var B=$d("change_piclist").getElementsByTagName("li");
    for(var e=1;e<B.length;e++){
    B[e].onmouseout=function(){
    classNormal("change_piclist","change_btn");
        classCurrent("change_piclist","change_btn",0)
    };
    }
    }
    </script>
    <body>
    <div id="change_pic">
      <div id="change_def1"></div>
      <div id="change_def2"></div>
      <div id="change_cent">
           <div id="change_btn">
                <ul>
                    <li class="normal"><a href="#"><IMG src="http://www.52tbz.cn/images/s10.jpg" ></a></li>
                    <li class="normal"><a href="#"><IMG src="http://www.52tbz.cn/images/s13.jpg" ></a></li>
                    <li class="normal"><a href="#"><IMG src="http://www.52tbz.cn/images/s15.jpg" ></a></li>
                    <li class="normal"><a href="#"><IMG src="http://www.52tbz.cn/images/s17.jpg" ></a></li>
                </ul>    
            </div>
            <DIV id="change_piclist">
                <UL>
                    <LI class="current"><A href="#"><IMG alt="" src="http://www.52tbz.cn/images/01.jpg"></A> </LI>
                    <LI class="normal"><A href="#"><IMG alt="" src="http://www.52tbz.cn/images/02.jpg"></A> </LI>
                    <LI class="normal"><A href="#"><IMG alt="" src="http://www.52tbz.cn/images/03.jpg"></A></LI>
                    <LI class="normal"><A href="#"><IMG alt="" src="http://www.52tbz.cn/images/04.jpg"></A></LI>
                    <LI class="normal"><A href="#"><IMG alt="" src="http://www.52tbz.cn/images/05.jpg"></A></LI>
                </UL>
            </DIV>
      </div>
      <div id="change_def3"></div>
    </div>
    <SCRIPT type=text/javascript>FocusChange();</SCRIPT>
    </body>
    </html>
      

  4.   

    这种代码太多了,随便帮你找了一个:)要改你的嘛,比较痛苦!楼主根据下面这个自己改一下就OK了,有你需要的动态效果<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>QPSH网页特效 18115.com首页图片切换</title>
    <style type="text/css">
    /* Reset style */
    * { margin:0; padding:0; word-break:break-all; }
    body {
    background:#fff;
    color:#000000;
    font:12px/1.6em Helvetica, Arial, sans-serif;
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    }
    h1, h2, h3, h4, h5, h6 { font-size:1em; }
    a { color:#0287CA; text-decoration:none; }
    a:hover { text-decoration:underline; }
    ul, li { list-style:none; }
    fieldset, img { border:none; }
    legend { display:none; }
    em, strong, cite, th { font-style:normal; font-weight:normal; }
    input, textarea, select, button { font:12px Helvetica, Arial, sans-serif; }
    table { border-collapse:collapse; }
    html { overflow:-moz-scrollbars-vertical; } /*Always show Firefox scrollbar*//* iFocus style */
    #ifocus { width:650px; height:245px; margin:0px; border:1px solid #DEDEDE; background:#F8F8F8; }
    #ifocus_pic { display:inline; position:relative; float:left; width:540px; height:225px; overflow:hidden; margin:10px 0 0 10px; }
    #ifocus_piclist { position:absolute; }
    #ifocus_piclist li { width:550px; height:225px; overflow:hidden; }
    #ifocus_piclist img { width:550px; height:225px; }
    #ifocus_btn { display:inline; float:right; width:91px; margin:9px 9px 0 0; }
    #ifocus_btn li { width:91px; height:57px; cursor:pointer; opacity:0.5; -moz-opacity:0.5; filter:alpha(opacity=50); }
    #ifocus_btn img { width:75px; height:45px; margin:7px 0 0 11px; }
    #ifocus_btn .current { background: url(img/ifocus_btn_bg.gif) no-repeat; opacity:1; -moz-opacity:1; filter:alpha(opacity=100); }
    #ifocus_opdiv { position:absolute; left:0; bottom:0; width:545px; height:35px; background:#000; opacity:0.5; -moz-opacity:0.5; filter:alpha(opacity=50); }
    #ifocus_tx { position:absolute; left:8px; bottom:8px; color:#FFF; }
    #ifocus_tx .normal { display:none; }
    </style><script type="text/javascript">
    function $(id) { return document.getElementById(id); }function addLoadEvent(func){
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
    window.onload = func;
    } else {
    window.onload = function(){
    oldonload();
    func();
    }
    }
    }function moveElement(elementID,final_x,final_y,interval) {
      if (!document.getElementById) return false;
      if (!document.getElementById(elementID)) return false;
      var elem = document.getElementById(elementID);
      if (elem.movement) {
        clearTimeout(elem.movement);
      }
      if (!elem.style.left) {
        elem.style.left = "0px";
      }
      if (!elem.style.top) {
        elem.style.top = "0px";
      }
      var xpos = parseInt(elem.style.left);
      var ypos = parseInt(elem.style.top);
      if (xpos == final_x && ypos == final_y) {
    return true;
      }
      if (xpos < final_x) {
        var dist = Math.ceil((final_x - xpos)/10);
        xpos = xpos + dist;
      }
      if (xpos > final_x) {
        var dist = Math.ceil((xpos - final_x)/10);
        xpos = xpos - dist;
      }
      if (ypos < final_y) {
        var dist = Math.ceil((final_y - ypos)/10);
        ypos = ypos + dist;
      }
      if (ypos > final_y) {
        var dist = Math.ceil((ypos - final_y)/10);
        ypos = ypos - dist;
      }
      elem.style.left = xpos + "px";
      elem.style.top = ypos + "px";
      var repeat = "moveElement('"+elementID+"',"+final_x+","+final_y+","+interval+")";
      elem.movement = setTimeout(repeat,interval);
    }function classNormal(iFocusBtnID,iFocusTxID){
    var iFocusBtns= $(iFocusBtnID).getElementsByTagName('li');
    var iFocusTxs = $(iFocusTxID).getElementsByTagName('li');
    for(var i=0; i<iFocusBtns.length; i++) {
    iFocusBtns[i].className='normal';
    iFocusTxs[i].className='normal';
    }
    }function classCurrent(iFocusBtnID,iFocusTxID,n){
    var iFocusBtns= $(iFocusBtnID).getElementsByTagName('li');
    var iFocusTxs = $(iFocusTxID).getElementsByTagName('li');
    iFocusBtns[n].className='current';
    iFocusTxs[n].className='current';
    }function iFocusChange() {
    if(!$('ifocus')) return false;
    $('ifocus').onmouseover = function(){atuokey = true};
    $('ifocus').onmouseout = function(){atuokey = false};
    var iFocusBtns = $('ifocus_btn').getElementsByTagName('li');
    var listLength = iFocusBtns.length;
    iFocusBtns[0].onmouseover = function() {
    moveElement('ifocus_piclist',0,0,5);
    classNormal('ifocus_btn','ifocus_tx');
    classCurrent('ifocus_btn','ifocus_tx',0);
    }
    if (listLength>=2) {
    iFocusBtns[1].onmouseover = function() {
    moveElement('ifocus_piclist',0,-225,5);
    classNormal('ifocus_btn','ifocus_tx');
    classCurrent('ifocus_btn','ifocus_tx',1);
    }
    }
    if (listLength>=3) {
    iFocusBtns[2].onmouseover = function() {
    moveElement('ifocus_piclist',0,-450,5);
    classNormal('ifocus_btn','ifocus_tx');
    classCurrent('ifocus_btn','ifocus_tx',2);
    }
    }
    if (listLength>=4) {
    iFocusBtns[3].onmouseover = function() {
    moveElement('ifocus_piclist',0,-675,5);
    classNormal('ifocus_btn','ifocus_tx');
    classCurrent('ifocus_btn','ifocus_tx',3);
    }
    }
    }setInterval('autoiFocus()',3500);
    var atuokey = false;
    function autoiFocus() {
    if(!$('ifocus')) return false;
    if(atuokey) return false;
    var focusBtnList = $('ifocus_btn').getElementsByTagName('li');
    var listLength = focusBtnList.length;
    for(var i=0; i<listLength; i++) {
    if (focusBtnList[i].className == 'current') var currentNum = i;
    }
    if (currentNum==0&&listLength!=1 ){
    moveElement('ifocus_piclist',0,-225,5);
    classNormal('ifocus_btn','ifocus_tx');
    classCurrent('ifocus_btn','ifocus_tx',1);
    }
    if (currentNum==1&&listLength!=2 ){
    moveElement('ifocus_piclist',0,-450,5);
    classNormal('ifocus_btn','ifocus_tx');
    classCurrent('ifocus_btn','ifocus_tx',2);
    }
    if (currentNum==2&&listLength!=3 ){
    moveElement('ifocus_piclist',0,-675,5);
    classNormal('ifocus_btn','ifocus_tx');
    classCurrent('ifocus_btn','ifocus_tx',3);
    }
    if (currentNum==3 ){
    moveElement('ifocus_piclist',0,0,5);
    classNormal('ifocus_btn','ifocus_tx');
    classCurrent('ifocus_btn','ifocus_tx',0);
    }
    if (currentNum==1&&listLength==2 ){
    moveElement('ifocus_piclist',0,0,5);
    classNormal('ifocus_btn','ifocus_tx');
    classCurrent('ifocus_btn','ifocus_tx',0);
    }
    if (currentNum==2&&listLength==3 ){
    moveElement('ifocus_piclist',0,0,5);
    classNormal('ifocus_btn','ifocus_tx');
    classCurrent('ifocus_btn','ifocus_tx',0);
    }
    }
    addLoadEvent(iFocusChange);
    </script>
    </head><body>
    <br />
    <div align="center">
    <div id="ifocus">
    <div id="ifocus_pic">
    <div id="ifocus_piclist" style="left:0; top:0;">
    <ul>
    <li><a href="http://u.9way.cn/50sg/uport/u70608_26_0" target="_blank"><img src="/icon/18115/01.jpg" alt="武林三国" border="0" /></a></li>
    <li><a href="http://u.9wee.com/uport/u71859319_103_0" target="_blank"><img src="/icon/18115/02.jpg" alt="武林英雄" border="0" /></a></li>
    <li><a href="http://u.popwan.com/pc555/gamebto/" target="_blank"><img src="/icon/18115/03.jpg" alt="商业大亨" border="0" /></a></li>
    <li><a href="http://u.popwan.com/pc555/dgyz/" target="_blank"><img src="/icon/18115/04.jpg" alt="帝国远征" border="0" /></a></li>
    </ul>
    </div>
    <div id="ifocus_opdiv"></div>
    <div id="ifocus_tx">
    <ul>
    <li class="current">2008年度排名第一的网页游戏-武林三国</li>
    <li class="normal">2009年最新的网页游戏,游戏特长:个人英雄主义 </li>
    <li class="normal">商业大亨,挑战亿万富翁,09年顶级网页游戏</li>
    <li class="normal">一款2009年不得不玩的网页游戏-帝国远征</li>
    </ul>
    </div>
    </div>
    <div id="ifocus_btn">
    <ul>
    <li class="current"><img src="/icon/18115/btn_01.jpg" alt="" /></li>
    <li class="normal"><img src="/icon/18115/btn_02.jpg" alt="" /></li>
    <li class="normal"><img src="/icon/18115/btn_03.jpg" alt="" /></li>
    <li class="normal"><img src="/icon/18115/btn_04.jpg" alt="" /></li>
    </ul>
    </div>
    </div>
    </div>
    </body>
    </html>
      

  5.   

    谢谢5楼的兄弟,我使用你的代码中的滑动功能。做了简单的修改能够在IE7+上可以完美运行了。<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>页图片切换</title>
    <style type="text/css">
    * { margin:0; padding:0; word-break:break-all; }
    body {background:#fff;color:#000000;font:12px/1.6em Helvetica, Arial, sans-serif;margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;}
    ul, li { list-style:none; }
    img { border:none; }/* iFocus style */
    #change {width:722px; height:241px; padding:0 0; margin:0 0; background:#FDF0E0 url(images/ex_index_04.jpg) left top no-repeat;overflow:hidden; }
    #change_def1{ height:5px; line-height:5px; font-size:5px; overflow:hidden;}
    #change_def2{ width:3px; height:231px; font-size:3px; overflow:hidden; float:left;}
    #change_def3{ clear:both; width:722px; height:5px; line-height:5px; font-size:3px; overflow:hidden;}
    #change_btn { float:left; width:138px; margin:0 0; padding:0 0; text-align:center;}
    #change_btn li { width:138px; height:56px; cursor:pointer; background:#FFF; margin-bottom:2px; }
    #change_btn img { width:132px; height:50px; margin:3px 0 0 0; }
    #change_btn .current {BACKGROUND:#D22425; }
    #change_pic {float:left; width:578px; height:230px; overflow:hidden;overflow:hidden;position:relative; margin-left:3px;}
    #change_piclist {
    width:578px;
    height:230px;
    position:absolute;
    left: 0px;
    top: 0px;
    }
    #change_piclist li { width:578px; height:230px; overflow:hidden; padding:0 0; margin:0 0;}
    #change_piclist img { WIDTH: 578px; HEIGHT: 230px; border:0;}
    </style><script type="text/javascript">
    function $(id) { return document.getElementById(id); }function classNormal(b){
        var a= $(b).getElementsByTagName('li');
        for(var i=0; i<a.length; i++) {
            a[i].className='normal';
        }
    }function classCurrent(b,c){
        var a= $(b).getElementsByTagName('li');
        a[c].className='current';
    }function FocusChange() {
        if(!$('change')) return false;
    for(var i=1;i<4;i++){
    var P=$("change_def"+i);
    P.onmouseout=function(){
    moveElement('change_piclist',0,0,5);
    classNormal('change_btn');
    };
    }
    var B=$("change_piclist").getElementsByTagName("li");
       for(var e=1;e<B.length;e++){
    B[e].onmouseout=function(){
    moveElement('change_piclist',0,0,5);
    classNormal('change_btn');
    };
       }
        var A = $('change_btn').getElementsByTagName('li');
        var listLength = A.length;
        A[0].onmouseover = function() {
            moveElement('change_piclist',0,-230,5);
            classNormal('change_btn');
            classCurrent('change_btn',0);
        }
        A[1].onmouseover = function() {
                moveElement('change_piclist',0,-460,5);
                classNormal('change_btn');
                classCurrent('change_btn',1);
            }
        A[2].onmouseover = function() {
                moveElement('change_piclist',0,-690,5);
                classNormal('change_btn');
                classCurrent('change_btn',2);
            }    A[3].onmouseover = function() {
                moveElement('change_piclist',0,-920,5);
                classNormal('change_btn');
                classCurrent('change_btn',3);
            }
    }function moveElement(elementID,final_x,final_y,interval) {
      if (!document.getElementById) return false;
      if (!document.getElementById(elementID)) return false;
      var elem = document.getElementById(elementID);
      if (elem.movement) {
        clearTimeout(elem.movement);
      }
      if (!elem.style.left) {
        elem.style.left = "0px";
      }
      if (!elem.style.top) {
        elem.style.top = "0px";
      }
      var xpos = parseInt(elem.style.left);
      var ypos = parseInt(elem.style.top);
      if (xpos == final_x && ypos == final_y) {
            return true;
      }
      if (xpos < final_x) {
        var dist = Math.ceil((final_x - xpos)/10);
        xpos = xpos + dist;
      }
      if (xpos > final_x) {
        var dist = Math.ceil((xpos - final_x)/10);
        xpos = xpos - dist;
      }
      if (ypos < final_y) {
        var dist = Math.ceil((final_y - ypos)/10);
        ypos = ypos + dist;
      }
      if (ypos > final_y) {
        var dist = Math.ceil((ypos - final_y)/10);
        ypos = ypos - dist;
      }
      elem.style.left = xpos + "px";
      elem.style.top = ypos + "px";
      var repeat = "moveElement('"+elementID+"',"+final_x+","+final_y+","+interval+")";
      elem.movement = setTimeout(repeat,interval);
    }
    </script>
    </head><body>
    <br /><div id="change">
      <div id="change_def1"></div>
      <div id="change_def2"></div>
      <div id="change_btn">
            <ul>
                    <li class="normal"><a href="#"><IMG src="http://www.52tbz.cn/s10.jpg" ></a></li>
                    <li class="normal"><a href="#"><IMG src="http://www.52tbz.cn/s13.jpg" ></a></li>
                    <li class="normal"><a href="#"><IMG src="http://www.52tbz.cn/s15.jpg" ></a></li>
                    <li class="normal"><a href="#"><IMG src="http://www.52tbz.cn/s17.jpg" ></a></li>
            </ul>
      </div>
    <div id="change_pic">
         <div id="change_piclist">
              <ul>
                    <LI><A href="#"><IMG alt="" src="http://www.52tbz.cn/01.jpg"></A> </LI>
                    <LI><A href="#"><IMG alt="" src="http://www.52tbz.cn/02.jpg"></A> </LI>
                    <LI><A href="#"><IMG alt="" src="http://www.52tbz.cn/03.jpg"></A></LI>
                    <LI><A href="#"><IMG alt="" src="http://www.52tbz.cn/04.jpg"></A></LI>
                    <LI><A href="#"><IMG alt="" src="http://www.52tbz.cn/05.jpg"></A></LI>
                 </ul>
             </div>
       </div>
      <div id="change_def3"></div>
    </div>
    <SCRIPT type=text/javascript>FocusChange();</SCRIPT>
    </body>
    </html>