家园首页 Php4手册 我的相册 家园下载 个人文集 给我留言
我形我塑,网络相册,www.5x54.com 相册 相册 心情相册,少女相册 免费申请,我形我塑免费相册
 家园 个人文集   http://www.5x54.com
 


焦点图片轮换第三季-iFocus


作者:dianfish    点击: 读取中...

(%$$371#^67)心情家园www.bbsdiy.net
(%$$371#^67)心情家园www.bbsdiy.net
查看效果  源码下载 (%$$371#^67)心情家园www.bbsdiy.net
  此个效果原本是一个很酷的flash做的(%$$371#^67)心情家园www.bbsdiy.net,效果也十分的炫(%$$371#^67)心情家园www.bbsdiy.net,那渐变和鼠标移过时的按钮跟踪十分喜欢,应该很多人都看到过这效果。同时我也想拥有一个JS版的(%$$371#^67)心情家园www.bbsdiy.net,此次焦点图片轮换效果占命名为iFocus(%$$371#^67)心情家园www.bbsdiy.net,还有很多细节方面没达到flash那种程度(%$$371#^67)心情家园www.bbsdiy.net,但基本需求可以满足。 (%$$371#^67)心情家园www.bbsdiy.net
主要效果(%$$371#^67)心情家园www.bbsdiy.net
大图(%$$371#^67)心情家园www.bbsdiy.net,小图(%$$371#^67)心情家园www.bbsdiy.net,及对应的标题(%$$371#^67)心情家园www.bbsdiy.net,自动每5秒活动焦点变化一次  (%$$371#^67)心情家园www.bbsdiy.net
当鼠标移到此效果上面时(%$$371#^67)心情家园www.bbsdiy.net,停止每5秒自动焦点变化  (%$$371#^67)心情家园www.bbsdiy.net
当鼠标移动到四个小图上时(%$$371#^67)心情家园www.bbsdiy.net,焦点变换到相对应的大图及标题  (%$$371#^67)心情家园www.bbsdiy.net
当传的内容过少只存在1,2,3个列表(%$$371#^67)心情家园www.bbsdiy.net,循环时不影响效果自动轮换活动 (%$$371#^67)心情家园www.bbsdiy.net
扩展修改(%$$371#^67)心情家园www.bbsdiy.net
为适应网页布局时(%$$371#^67)心情家园www.bbsdiy.net,在修改大小时(%$$371#^67)心情家园www.bbsdiy.net,大图(%$$371#^67)心情家园www.bbsdiy.net,小图对应的img需要修改  (%$$371#^67)心情家园www.bbsdiy.net
大图是利用top值滚动(%$$371#^67)心情家园www.bbsdiy.net,相对应的值top值在js里也需要修改  (%$$371#^67)心情家园www.bbsdiy.net
然后对滚动时间间隔可在setInterval(’autoiFocus()’,5000)中对5000进行修改,5000=5秒; (%$$371#^67)心情家园www.bbsdiy.net
(%$$371#^67)心情家园www.bbsdiy.net
引用代码:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> (%$$371#^67)心情家园www.bbsdiy.net
<html xmlns="http://www.w3.org/1999/xhtml"> (%$$371#^67)心情家园www.bbsdiy.net
<head> (%$$371#^67)心情家园www.bbsdiy.net
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> (%$$371#^67)心情家园www.bbsdiy.net
<title>佐佐制造byzuo.cn---焦点图片第三季</title> (%$$371#^67)心情家园www.bbsdiy.net
<style type="text/css"> (%$$371#^67)心情家园www.bbsdiy.net
/* Reset style */ (%$$371#^67)心情家园www.bbsdiy.net
* { margin:0; padding:0; word-break:break-all; } (%$$371#^67)心情家园www.bbsdiy.net
body { background:#FFF; color:#333; font:12px/1.6em Helvetica, Arial, sans-serif; } (%$$371#^67)心情家园www.bbsdiy.net
h1, h2, h3, h4, h5, h6 { font-size:1em; } (%$$371#^67)心情家园www.bbsdiy.net
a { color:#0287CA; text-decoration:none; } (%$$371#^67)心情家园www.bbsdiy.net
a:hover { text-decoration:underline; } (%$$371#^67)心情家园www.bbsdiy.net
ul, li { list-style:none; } (%$$371#^67)心情家园www.bbsdiy.net
fieldset, img { border:none; } (%$$371#^67)心情家园www.bbsdiy.net
legend { display:none; } (%$$371#^67)心情家园www.bbsdiy.net
em, strong, cite, th { font-style:normal; font-weight:normal; } (%$$371#^67)心情家园www.bbsdiy.net
input, textarea, select, button { font:12px Helvetica, Arial, sans-serif; } (%$$371#^67)心情家园www.bbsdiy.net
table { border-collapse:collapse; } (%$$371#^67)心情家园www.bbsdiy.net
html { overflow:-moz-scrollbars-vertical; } /*Always show Firefox scrollbar*/ (%$$371#^67)心情家园www.bbsdiy.net
(%$$371#^67)心情家园www.bbsdiy.net
/* iFocus style */ (%$$371#^67)心情家园www.bbsdiy.net
#ifocus { width:525px; height:245px; margin:20px; border:1px solid #DEDEDE; background:#F8F8F8; } (%$$371#^67)心情家园www.bbsdiy.net
#ifocus_pic { display:inline; position:relative; float:left; width:410px; height:225px; overflow:hidden; margin:10px 0 0 10px; } (%$$371#^67)心情家园www.bbsdiy.net
#ifocus_piclist { position:absolute; } (%$$371#^67)心情家园www.bbsdiy.net
#ifocus_piclist li { width:410px; height:225px; overflow:hidden; } (%$$371#^67)心情家园www.bbsdiy.net
#ifocus_piclist img { width:410px; height:225px; } (%$$371#^67)心情家园www.bbsdiy.net
#ifocus_btn { display:inline; float:right; width:91px; margin:9px 9px 0 0; } (%$$371#^67)心情家园www.bbsdiy.net
#ifocus_btn li { width:91px; height:57px; cursor:pointer; opacity:0.5; -moz-opacity:0.5; filter:alpha(opacity=50); } (%$$371#^67)心情家园www.bbsdiy.net
#ifocus_btn img { width:75px; height:45px; margin:7px 0 0 11px; } (%$$371#^67)心情家园www.bbsdiy.net
#ifocus_btn .current { background: url(img/ifocus_btn_bg.gif) no-repeat; opacity:1; -moz-opacity:1; filter:alpha(opacity=100); } (%$$371#^67)心情家园www.bbsdiy.net
#ifocus_opdiv { position:absolute; left:0; bottom:0; width:410px; height:35px; background:#000; opacity:0.5; -moz-opacity:0.5; filter:alpha(opacity=50); } (%$$371#^67)心情家园www.bbsdiy.net
#ifocus_tx { position:absolute; left:8px; bottom:8px; color:#FFF; } (%$$371#^67)心情家园www.bbsdiy.net
#ifocus_tx .normal { display:none; } (%$$371#^67)心情家园www.bbsdiy.net
</style> (%$$371#^67)心情家园www.bbsdiy.net
(%$$371#^67)心情家园www.bbsdiy.net
<script type="text/javascript"> (%$$371#^67)心情家园www.bbsdiy.net
function $(id) { return document.getElementById(id); } (%$$371#^67)心情家园www.bbsdiy.net
(%$$371#^67)心情家园www.bbsdiy.net
function addLoadEvent(func){ (%$$371#^67)心情家园www.bbsdiy.net
var oldonload = window.onload; (%$$371#^67)心情家园www.bbsdiy.net
if (typeof window.onload != 'function') { (%$$371#^67)心情家园www.bbsdiy.net
window.onload = func; (%$$371#^67)心情家园www.bbsdiy.net
} else { (%$$371#^67)心情家园www.bbsdiy.net
window.onload = function(){ (%$$371#^67)心情家园www.bbsdiy.net
oldonload(); (%$$371#^67)心情家园www.bbsdiy.net
func(); (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
(%$$371#^67)心情家园www.bbsdiy.net
function moveElement(elementID,final_x,final_y,interval) { (%$$371#^67)心情家园www.bbsdiy.net
 if (!document.getElementById) return false; (%$$371#^67)心情家园www.bbsdiy.net
 if (!document.getElementById(elementID)) return false; (%$$371#^67)心情家园www.bbsdiy.net
 var elem = document.getElementById(elementID); (%$$371#^67)心情家园www.bbsdiy.net
 if (elem.movement) { (%$$371#^67)心情家园www.bbsdiy.net
  clearTimeout(elem.movement); (%$$371#^67)心情家园www.bbsdiy.net
 } (%$$371#^67)心情家园www.bbsdiy.net
 if (!elem.style.left) { (%$$371#^67)心情家园www.bbsdiy.net
  elem.style.left = "0px"; (%$$371#^67)心情家园www.bbsdiy.net
 } (%$$371#^67)心情家园www.bbsdiy.net
 if (!elem.style.top) { (%$$371#^67)心情家园www.bbsdiy.net
  elem.style.top = "0px"; (%$$371#^67)心情家园www.bbsdiy.net
 } (%$$371#^67)心情家园www.bbsdiy.net
 var xpos = parseInt(elem.style.left); (%$$371#^67)心情家园www.bbsdiy.net
 var ypos = parseInt(elem.style.top); (%$$371#^67)心情家园www.bbsdiy.net
 if (xpos == final_x && ypos == final_y) { (%$$371#^67)心情家园www.bbsdiy.net
return true; (%$$371#^67)心情家园www.bbsdiy.net
 } (%$$371#^67)心情家园www.bbsdiy.net
 if (xpos < final_x) { (%$$371#^67)心情家园www.bbsdiy.net
  var dist = Math.ceil((final_x - xpos)/10); (%$$371#^67)心情家园www.bbsdiy.net
  xpos = xpos + dist; (%$$371#^67)心情家园www.bbsdiy.net
 } (%$$371#^67)心情家园www.bbsdiy.net
 if (xpos > final_x) { (%$$371#^67)心情家园www.bbsdiy.net
  var dist = Math.ceil((xpos - final_x)/10); (%$$371#^67)心情家园www.bbsdiy.net
  xpos = xpos - dist; (%$$371#^67)心情家园www.bbsdiy.net
 } (%$$371#^67)心情家园www.bbsdiy.net
 if (ypos < final_y) { (%$$371#^67)心情家园www.bbsdiy.net
  var dist = Math.ceil((final_y - ypos)/10); (%$$371#^67)心情家园www.bbsdiy.net
  ypos = ypos + dist; (%$$371#^67)心情家园www.bbsdiy.net
 } (%$$371#^67)心情家园www.bbsdiy.net
 if (ypos > final_y) { (%$$371#^67)心情家园www.bbsdiy.net
  var dist = Math.ceil((ypos - final_y)/10); (%$$371#^67)心情家园www.bbsdiy.net
  ypos = ypos - dist; (%$$371#^67)心情家园www.bbsdiy.net
 } (%$$371#^67)心情家园www.bbsdiy.net
 elem.style.left = xpos + "px"; (%$$371#^67)心情家园www.bbsdiy.net
 elem.style.top = ypos + "px"; (%$$371#^67)心情家园www.bbsdiy.net
 var repeat = "moveElement('"+elementID+"',"+final_x+","+final_y+","+interval+")"; (%$$371#^67)心情家园www.bbsdiy.net
 elem.movement = setTimeout(repeat,interval); (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
(%$$371#^67)心情家园www.bbsdiy.net
function classNormal(iFocusBtnID,iFocusTxID){ (%$$371#^67)心情家园www.bbsdiy.net
var iFocusBtns= $(iFocusBtnID).getElementsByTagName('li'); (%$$371#^67)心情家园www.bbsdiy.net
var iFocusTxs = $(iFocusTxID).getElementsByTagName('li'); (%$$371#^67)心情家园www.bbsdiy.net
for(var i=0; i<iFocusBtns.length; i++) { (%$$371#^67)心情家园www.bbsdiy.net
iFocusBtns.className='normal'; (%$$371#^67)心情家园www.bbsdiy.net
iFocusTxs.className='normal'; (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
(%$$371#^67)心情家园www.bbsdiy.net
function classCurrent(iFocusBtnID,iFocusTxID,n){ (%$$371#^67)心情家园www.bbsdiy.net
var iFocusBtns= $(iFocusBtnID).getElementsByTagName('li'); (%$$371#^67)心情家园www.bbsdiy.net
var iFocusTxs = $(iFocusTxID).getElementsByTagName('li'); (%$$371#^67)心情家园www.bbsdiy.net
iFocusBtns[n].className='current'; (%$$371#^67)心情家园www.bbsdiy.net
iFocusTxs[n].className='current'; (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
(%$$371#^67)心情家园www.bbsdiy.net
function iFocusChange() { (%$$371#^67)心情家园www.bbsdiy.net
if(!$('ifocus')) return false; (%$$371#^67)心情家园www.bbsdiy.net
$('ifocus').onmouseover = function(){atuokey = true}; (%$$371#^67)心情家园www.bbsdiy.net
$('ifocus').onmouseout = function(){atuokey = false}; (%$$371#^67)心情家园www.bbsdiy.net
var iFocusBtns = $('ifocus_btn').getElementsByTagName('li'); (%$$371#^67)心情家园www.bbsdiy.net
var listLength = iFocusBtns.length; (%$$371#^67)心情家园www.bbsdiy.net
iFocusBtns[0].onmouseover = function() { (%$$371#^67)心情家园www.bbsdiy.net
moveElement('ifocus_piclist',0,0,5); (%$$371#^67)心情家园www.bbsdiy.net
classNormal('ifocus_btn','ifocus_tx'); (%$$371#^67)心情家园www.bbsdiy.net
classCurrent('ifocus_btn','ifocus_tx',0); (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
if (listLength>=2) { (%$$371#^67)心情家园www.bbsdiy.net
iFocusBtns[1].onmouseover = function() { (%$$371#^67)心情家园www.bbsdiy.net
moveElement('ifocus_piclist',0,-225,5); (%$$371#^67)心情家园www.bbsdiy.net
classNormal('ifocus_btn','ifocus_tx'); (%$$371#^67)心情家园www.bbsdiy.net
classCurrent('ifocus_btn','ifocus_tx',1); (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
if (listLength>=3) { (%$$371#^67)心情家园www.bbsdiy.net
iFocusBtns[2].onmouseover = function() { (%$$371#^67)心情家园www.bbsdiy.net
moveElement('ifocus_piclist',0,-450,5); (%$$371#^67)心情家园www.bbsdiy.net
classNormal('ifocus_btn','ifocus_tx'); (%$$371#^67)心情家园www.bbsdiy.net
classCurrent('ifocus_btn','ifocus_tx',2); (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
if (listLength>=4) { (%$$371#^67)心情家园www.bbsdiy.net
iFocusBtns[3].onmouseover = function() { (%$$371#^67)心情家园www.bbsdiy.net
moveElement('ifocus_piclist',0,-675,5); (%$$371#^67)心情家园www.bbsdiy.net
classNormal('ifocus_btn','ifocus_tx'); (%$$371#^67)心情家园www.bbsdiy.net
classCurrent('ifocus_btn','ifocus_tx',3); (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
(%$$371#^67)心情家园www.bbsdiy.net
setInterval('autoiFocus()',5000); (%$$371#^67)心情家园www.bbsdiy.net
var atuokey = false; (%$$371#^67)心情家园www.bbsdiy.net
function autoiFocus() { (%$$371#^67)心情家园www.bbsdiy.net
if(!$('ifocus')) return false; (%$$371#^67)心情家园www.bbsdiy.net
if(atuokey) return false; (%$$371#^67)心情家园www.bbsdiy.net
var focusBtnList = $('ifocus_btn').getElementsByTagName('li'); (%$$371#^67)心情家园www.bbsdiy.net
var listLength = focusBtnList.length; (%$$371#^67)心情家园www.bbsdiy.net
for(var i=0; i<listLength; i++) { (%$$371#^67)心情家园www.bbsdiy.net
if (focusBtnList.className == 'current') var currentNum = i; (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
if (currentNum==0&&listLength!=1 ){ (%$$371#^67)心情家园www.bbsdiy.net
moveElement('ifocus_piclist',0,-225,5); (%$$371#^67)心情家园www.bbsdiy.net
classNormal('ifocus_btn','ifocus_tx'); (%$$371#^67)心情家园www.bbsdiy.net
classCurrent('ifocus_btn','ifocus_tx',1); (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
if (currentNum==1&&listLength!=2 ){ (%$$371#^67)心情家园www.bbsdiy.net
moveElement('ifocus_piclist',0,-450,5); (%$$371#^67)心情家园www.bbsdiy.net
classNormal('ifocus_btn','ifocus_tx'); (%$$371#^67)心情家园www.bbsdiy.net
classCurrent('ifocus_btn','ifocus_tx',2); (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
if (currentNum==2&&listLength!=3 ){ (%$$371#^67)心情家园www.bbsdiy.net
moveElement('ifocus_piclist',0,-675,5); (%$$371#^67)心情家园www.bbsdiy.net
classNormal('ifocus_btn','ifocus_tx'); (%$$371#^67)心情家园www.bbsdiy.net
classCurrent('ifocus_btn','ifocus_tx',3); (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
if (currentNum==3 ){ (%$$371#^67)心情家园www.bbsdiy.net
moveElement('ifocus_piclist',0,0,5); (%$$371#^67)心情家园www.bbsdiy.net
classNormal('ifocus_btn','ifocus_tx'); (%$$371#^67)心情家园www.bbsdiy.net
classCurrent('ifocus_btn','ifocus_tx',0); (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
if (currentNum==1&&listLength==2 ){ (%$$371#^67)心情家园www.bbsdiy.net
moveElement('ifocus_piclist',0,0,5); (%$$371#^67)心情家园www.bbsdiy.net
classNormal('ifocus_btn','ifocus_tx'); (%$$371#^67)心情家园www.bbsdiy.net
classCurrent('ifocus_btn','ifocus_tx',0); (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
if (currentNum==2&&listLength==3 ){ (%$$371#^67)心情家园www.bbsdiy.net
moveElement('ifocus_piclist',0,0,5); (%$$371#^67)心情家园www.bbsdiy.net
classNormal('ifocus_btn','ifocus_tx'); (%$$371#^67)心情家园www.bbsdiy.net
classCurrent('ifocus_btn','ifocus_tx',0); (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
} (%$$371#^67)心情家园www.bbsdiy.net
addLoadEvent(iFocusChange); (%$$371#^67)心情家园www.bbsdiy.net
</script> (%$$371#^67)心情家园www.bbsdiy.net
</head> (%$$371#^67)心情家园www.bbsdiy.net
(%$$371#^67)心情家园www.bbsdiy.net
<body> (%$$371#^67)心情家园www.bbsdiy.net
<div id="ifocus"> (%$$371#^67)心情家园www.bbsdiy.net
<div id="ifocus_pic"> (%$$371#^67)心情家园www.bbsdiy.net
<div id="ifocus_piclist" style="left:0; top:0;"> (%$$371#^67)心情家园www.bbsdiy.net
<ul> (%$$371#^67)心情家园www.bbsdiy.net
<li><a href="#"><img src="img/01.jpg" alt="" /></a></li> (%$$371#^67)心情家园www.bbsdiy.net
<li><a href="#"><img src="img/02.jpg" alt="" /></a></li> (%$$371#^67)心情家园www.bbsdiy.net
<li><a href="#"><img src="img/03.jpg" alt="" /></a></li> (%$$371#^67)心情家园www.bbsdiy.net
<li><a href="#"><img src="img/04.jpg" alt="" /></a></li> (%$$371#^67)心情家园www.bbsdiy.net
</ul> (%$$371#^67)心情家园www.bbsdiy.net
</div> (%$$371#^67)心情家园www.bbsdiy.net
<div id="ifocus_opdiv"></div> (%$$371#^67)心情家园www.bbsdiy.net
<div id="ifocus_tx"> (%$$371#^67)心情家园www.bbsdiy.net
<ul> (%$$371#^67)心情家园www.bbsdiy.net
<li class="current">火箭85-78马刺 姚明依旧像新秀a1</li> (%$$371#^67)心情家园www.bbsdiy.net
<li class="normal">阿德尔曼:姚明进攻太犹豫 火箭还有很长路要走b2</li> (%$$371#^67)心情家园www.bbsdiy.net
<li class="normal">阿联脚伤未出场卡特意外受伤 网队加时险胜热队c3</li> (%$$371#^67)心情家园www.bbsdiy.net
<li class="normal">帕杜惊讶能留住郑智 英媒称查尔顿升超要靠d4</li> (%$$371#^67)心情家园www.bbsdiy.net
</ul> (%$$371#^67)心情家园www.bbsdiy.net
</div> (%$$371#^67)心情家园www.bbsdiy.net
</div> (%$$371#^67)心情家园www.bbsdiy.net
<div id="ifocus_btn"> (%$$371#^67)心情家园www.bbsdiy.net
<ul> (%$$371#^67)心情家园www.bbsdiy.net
<li class="current"><img src="img/btn_01.jpg" alt="" /></li> (%$$371#^67)心情家园www.bbsdiy.net
<li class="normal"><img src="img/btn_02.jpg" alt="" /></li> (%$$371#^67)心情家园www.bbsdiy.net
<li class="normal"><img src="img/btn_03.jpg" alt="" /></li> (%$$371#^67)心情家园www.bbsdiy.net
<li class="normal"><img src="img/btn_04.jpg" alt="" /></li> (%$$371#^67)心情家园www.bbsdiy.net
</ul> (%$$371#^67)心情家园www.bbsdiy.net
</div> (%$$371#^67)心情家园www.bbsdiy.net
</div><!--ifocus end--> (%$$371#^67)心情家园www.bbsdiy.net
(%$$371#^67)心情家园www.bbsdiy.net
(%$$371#^67)心情家园www.bbsdiy.net
<div style="height:20px; background:#EEE;"></div> (%$$371#^67)心情家园www.bbsdiy.net
<p style="padding:20px;"> (%$$371#^67)心情家园www.bbsdiy.net
主要效果:<br /> (%$$371#^67)心情家园www.bbsdiy.net
1.大图(%$$371#^67)心情家园www.bbsdiy.net,小图(%$$371#^67)心情家园www.bbsdiy.net,及对应的标题(%$$371#^67)心情家园www.bbsdiy.net,自动每5秒活动焦点变化一次<br /> (%$$371#^67)心情家园www.bbsdiy.net
2.当鼠标移到此效果上面时(%$$371#^67)心情家园www.bbsdiy.net,停止每5秒自动焦点变化<br /> (%$$371#^67)心情家园www.bbsdiy.net
3.当鼠标移动到四个小图上时(%$$371#^67)心情家园www.bbsdiy.net,焦点变换到相对应的大图及标题<br /> (%$$371#^67)心情家园www.bbsdiy.net
4.当传的内容过少只存在1,2,3个列表(%$$371#^67)心情家园www.bbsdiy.net,循环时不影响效果自动轮换活动<br /> (%$$371#^67)心情家园www.bbsdiy.net
扩展修改:<br /> (%$$371#^67)心情家园www.bbsdiy.net
1.为适应网页布局时(%$$371#^67)心情家园www.bbsdiy.net,在修改大小时(%$$371#^67)心情家园www.bbsdiy.net,大图(%$$371#^67)心情家园www.bbsdiy.net,小图对应的img需要修改<br /> (%$$371#^67)心情家园www.bbsdiy.net
2.大图是利用top值滚动(%$$371#^67)心情家园www.bbsdiy.net,相对应的值top值在js里也需要修改<br /> (%$$371#^67)心情家园www.bbsdiy.net
3.然后对滚动时间间隔可在setInterval('autoiFocus()',5000)中对5000进行修改,5000=5秒;<br /> (%$$371#^67)心情家园www.bbsdiy.net
能力有限,不足之处请指正....  (%$$371#^67)心情家园www.bbsdiy.net
</p> (%$$371#^67)心情家园www.bbsdiy.net
</body> (%$$371#^67)心情家园www.bbsdiy.net
</html>

收藏此文章     打印  更新     编辑此文章    『关闭窗口』