发新话题
打印

这个图片滑动width:450的,希望各位好心人改成width:500px

这个图片滑动width:450的,希望各位好心人改成width:500px

<!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" />
<meta name="keywords" content="站长,网页特效,js特效,广告代码,zzjs,zzjs.net,sky,www.zzjs.net,站长特效 网" />
<meta name="description" content="www.zzjs.net,站长特效网,站长必备js特效及广告代码。大量高质量js特效,提供高质量广告代码下载,尽在站长特效网" />
<title>漂亮图片切换效果,sky整理收集。</title>
<style type="text/css">
/* Reset style */
* { margin:0; padding:0; word-break:break-all; }
body { background:#FFF; color:#333; font:12px/1.6em Helvetica, Arial, sans-serif; }
h1, h2, h3, h4, h5, h6 { font-size:1em; }
a { color:#039; text-decoration:none; }
a:hover { text-decoration:underline; }
ul, li { list-style:none; }
fieldset, img { border:none; }
em, strong, cite, th { font-style:normal; font-weight:normal; }
/* Focus_change style */
#focus_change { position:relative; width:450px; height:295px; overflow:hidden; margin:20px 0 1px 60px; }
#focus_change_list { position:absolute; width:1800px; height:295px; }
  #focus_change_list li { float:left; }
  #focus_change_list li img { width:450px; height:295px; }
.focus_change_opacity { position:absolute; width:450px; height:70px; top:225px; left:0; background:#000; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5; }
#focus_change_btn { position:absolute; width:450px; height:65px; top:225px; left:0; }
  #focus_change_btn ul { padding-left:5px; }
  #focus_change_btn li { display:inline; float:left; margin:0 15px; padding-top:12px; }
  #focus_change_btn li img { width:76px; height:50px; border:2px solid #888; }
  #focus_change_btn .current { background:url() no-repeat 37px 8px;}
  #focus_change_btn .current img { border-color:#EEE; }
</style>
<script type="text/javascript">
function $(id) { return document.getElementById(id); }
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);
  }//欢迎来到站长特效网,我们的网址是www.zzjs.net,很好记,zz站长,js就是js特效,本站收集大量高质量js代码,还有许多广告代码下载。
  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);
}//欢迎来到站长特效网,我们的网址是www.zzjs.net,很好记,zz站长,js就是js特效,本站收集大量高质量js代码,还有许多广告代码下载。
function classNormal(){
var focusBtnList = $('focus_change_btn').getElementsByTagName('li');
for(var i=0; i<focusBtnList.length; i++) {
  focusBtnList.className='';
}
}
function focusChange() {
var focusBtnList = $('focus_change_btn').getElementsByTagName('li');
  focusBtnList[0].onmouseover = function() {
   moveElement('focus_change_list',0,0,5);
   classNormal()
   focusBtnList[0].className='current'
  }
  focusBtnList[1].onmouseover = function() {
   moveElement('focus_change_list',-450,0,5);
   classNormal()
   focusBtnList[1].className='current'
  }
  focusBtnList[2].onmouseover = function() {
   moveElement('focus_change_list',-900,0,5);
   classNormal()
   focusBtnList[2].className='current'
  }
  focusBtnList[3].onmouseover = function() {
   moveElement('focus_change_list',-1350,0,5);
   classNormal()
   focusBtnList[3].className='current'
  }
}//欢迎来到站长特效网,我们的网址是www.zzjs.net,很好记,zz站长,js就是js特效,本站收集大量高质量js代码,还有许多广告代码下载。
setInterval('autoFocusChange()', 5000);
function autoFocusChange() {
var focusBtnList = $('focus_change_btn').getElementsByTagName('li');
for(var i=0; i<focusBtnList.length; i++) {
  if (focusBtnList.className == 'current') {
   var currentNum = i;
  }
}
if (currentNum==0 ){
  moveElement('focus_change_list',-450,0,5);
  classNormal()
  focusBtnList[1].className='current'
}
if (currentNum==1 ){
  moveElement('focus_change_list',-900,0,5);
  classNormal()
  focusBtnList[2].className='current'
}
if (currentNum==2 ){
  moveElement('focus_change_list',-1350,0,5);
  classNormal()
  focusBtnList[3].className='current'
}
if (currentNum==3 ){
  moveElement('focus_change_list',0,0,5);
  classNormal()
  focusBtnList[0].className='current'
}
}
window.onload=function(){
focusChange();
}//欢迎来到站长特效网,我们的网址是www.zzjs.net,很好记,zz站长,js就是js特效,本站收集大量高质量js代码,还有许多广告代码下载。
</script>
</head>
<body>
<a href="<#ZC_BLOG_HOST#>">站长特效网</a>,站长必备的高质量网页特效和广告代码。zzjs.net,站长js特效。<hr>
<!--欢迎来到站长特效网,我们网站收集大量高质量js特效,提供许多广告代码下载,网址:www.zzjs.net,zzjs@msn.com,用.net打造靓站-->
<div id="focus_change">
<div id="focus_change_list" style="top:0; left:0;">
  <ul>
  <li><img src="/image/1.jpg" alt=""  onload="return imgzoom(this,600);" onclick="javascript:window.open(this.src);" style="cursor:pointer;"/></li>
  <li><img src="/image/2.jpg" alt=""  onload="return imgzoom(this,600);" onclick="javascript:window.open(this.src);" style="cursor:pointer;"/></li>
  <li><img src="/image/3.jpg" alt=""  onload="return imgzoom(this,600);" onclick="javascript:window.open(this.src);" style="cursor:pointer;"/></li>
  <li><img src="/image/4.jpg" alt=""  onload="return imgzoom(this,600);" onclick="javascript:window.open(this.src);" style="cursor:pointer;"/></li>
  </ul>
</div>
<div class="focus_change_opacity"></div>
<div id="focus_change_btn">
  <ul>
  <li class="current"><a href="#"><img src="/image/1.jpg" alt=""  onload="return imgzoom(this,600);" onclick="javascript:window.open(this.src);" style="cursor:pointer;"/></a></li>
  <li><a href="#"><img src="/image/2.jpg" alt=""  onload="return imgzoom(this,600);" onclick="javascript:window.open(this.src);" style="cursor:pointer;"/></a></li>
  <li><a href="#"><img src="/image/3.jpg" alt=""  onload="return imgzoom(this,600);" onclick="javascript:window.open(this.src);" style="cursor:pointer;"/></a></li>
  <li><a href="#"><img src="/image/4.jpg" alt=""  onload="return imgzoom(this,600);" onclick="javascript:window.open(this.src);" style="cursor:pointer;"/></a></li>
  </ul>
</div>
</div><!--focus_change end-->
</body>
</html>
发新话题