网站首页 手机版
 注册 登录
您现在的位置: 畅无忧设计 >> 网页特效 >> 背景图像 >> 正文
最新文章
· 带文字说明的js幻灯片代码
· 浏览器全屏浏览图片集
· 创意中国flash+xml焦点图代码
· 仿QQ商城焦点图jquery幻灯特效
· 带缓冲效果的图片幻灯片
· css和jquery配合完成-ipad向左向右拖
· 图片自动按比例缩小代码(防止页面被
· 仿QQ新闻图片浏览效果
· 一个横向滑动的图片切换容器代码
· 鼠标移入/移出改变图片透明度
热门文章
 图片上的左右箭头切换上一张下一张
 带缩略图和左右箭头自动切换的图片
 产品展示专用的jQuery图片幻灯+缩略
 Flash+XML前后按钮的超漂亮图片切换
 图片左右滚动,带有左右方向控制
 Jquery幻灯片/焦点图插件KinSlides
 JS 图片左右滚动,图片控制左右滚动
 可控制左右滚动的无缝图片滚动特效
 可控制图片放大缩小还原移动效果的
 非常漂亮的JS带缩略图的幻灯图片切
相关文章
js封装的一个图片横向滚动效果
图片无缝横向、纵向滚动
可控制左右滚动的无缝图片滚动特效
JS图片滚动代码(无缝、平滑)
百度百科向左带停顿效果的图片滚动
图片左右滚动,带有左右方向控制
来源:百学资源站 更新时间:2010/7/18 0:27:32 阅读次数: 我要投稿
△运行 ☉预览 #复制 +收藏
特效代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>图片左右滚动,带有左右方向控制</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>TD {
 FONT-SIZE: 12px
}
A:link {
 COLOR: #a83300; TEXT-DECORATION: none
}
A:visited {
 COLOR: #a83300; TEXT-DECORATION: none
}
A:active {
 COLOR: #a83300; TEXT-DECORATION: underline
}
A:hover {
 COLOR: #a83300; TEXT-DECORATION: underline
}
/**/

</STYLE>

</HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<CENTER>

<table border="0" width="490" cellspacing="5" cellpadding="0">
 <tr>
  <td width="20"><img id="r_l" onClick="r_left()"src="http://www.cwydesign.com/effects/UploadFiles_7074/201008/2010081200382654.gif">
  </td>
  <td>
<TABLE cellSpacing=0 cellPadding=0 width=450 border=0>
  <TBODY>
  <TR>
    <TD vAlign=top background="" height=120>
      <TABLE cellSpacing=0 cellPadding=0 width=450 border=0>
        <TBODY>
        <TR>
          <TD vAlign=center align=middle height=120>
<!--------------------demo start------------------>
          <DIV id=demo style="OVERFLOW: hidden; WIDTH: 450px; COLOR: #ffffff; HEIGHT: 120px">
            <TABLE cellPadding=0 width="100%" align=left border=0 
            cellspace="0">
              <TBODY>
              <TR>
<!--------------------demo1--------------------->
               <TD id=demo1 vAlign=top>
                  <TABLE cellSpacing=1 cellPadding=1>
                    <TBODY>
                    <TR vAlign=top>
                      <TD vAlign=top noWrap>
                        <DIV align=right>
                        <TABLE cellSpacing=0 cellPadding=0 align=center border=0>
                          <TBODY>
                          <TR>
                            <TD align=middle>
                              <TABLE cellSpacing=0 cellPadding=0 width=150 align=center border=0>
                                <TBODY>
                                <TR>
                                <TD align=middle height=100><A href="#" target=_blank><IMG height=98 src="http://www.cwydesign.com/effects/UploadFiles_7074/201008/2010081200382624.jpg" width=130 
                                border=0></A></TD></TR>
                                <TR>
                                <TD class=nav1 align=middle height=20><A class=apm2 href="#" target=_blank>风景1</A></TD></TR></TBODY></TABLE></TD>
                            <TD align=middle>
                              <TABLE cellSpacing=0 cellPadding=0 width=150 align=center border=0>
                                <TBODY>
                                <TR>
                                <TD align=middle height=100><A href="#" target=_blank><IMG height=98 src="http://www.cwydesign.com/effects/UploadFiles_7074/201008/2010081200382663.jpg" width=130 
                                border=0></A></TD></TR>
                                <TR>
                                <TD class=nav1 align=middle height=20><A class=apm2 href="#" target=_blank>风景2</A></TD></TR></TBODY></TABLE></TD>
                            <TD align=middle>
                              <TABLE cellSpacing=0 cellPadding=0 width=150 align=center border=0>
                                <TBODY>
                                <TR>
                                <TD align=middle height=100><A href="#" target=_blank><IMG height=98 src="http://www.cwydesign.com/effects/UploadFiles_7074/201008/2010081200382644.jpg" width=130 
                                border=0></A></TD></TR>
                                <TR>
                                <TD class=nav1 align=middle height=20><A class=apm2 href="#" target=_blank>风景3</A></TD></TR></TBODY></TABLE></TD>
                            <TD align=middle>
                              <TABLE cellSpacing=0 cellPadding=0 width=150 align=center border=0>
                                <TBODY>
                                <TR>
                                <TD align=middle height=100><A href="#" target=_blank><IMG height=98 src="http://www.cwydesign.com/effects/UploadFiles_7074/201008/2010081200382624.jpg" width=130 
                                border=0></A></TD></TR>
                                <TR>
                                <TD class=nav1 align=middle height=20><A class=apm2 href="#" target=_blank>风景4</A></TD></TR></TBODY></TABLE></TD>
                            <TD align=middle>
                              <TABLE cellSpacing=0 cellPadding=0 width=150 align=center border=0>
                                <TBODY>
                                <TR>
                                <TD align=middle height=100><A href="#" target=_blank><IMG height=98 src="http://www.cwydesign.com/effects/UploadFiles_7074/201008/2010081200382663.jpg" width=130 
                                border=0></A></TD></TR>
                                <TR>
                                <TD class=nav1 align=middle height=20><A class=apm2 href="#" target=_blank>风景5</A></TD></TR></TBODY></TABLE></TD>
                            <TD align=middle>
                              <TABLE cellSpacing=0 cellPadding=0 width=150 align=center border=0>
                                <TBODY>
                                <TR>
                                <TD align=middle height=100><A href="#" target=_blank><IMG height=98 src="http://www.cwydesign.com/effects/UploadFiles_7074/201008/2010081200382644.jpg" width=130 
                                border=0></A></TD></TR>
                                <TR>
                                <TD class=nav1 align=middle height=20><A class=apm2 href="#" target=_blank>风景6</A></TD></TR></TBODY></TABLE></TD>
             </TR></TBODY></TABLE></DIV></TD></TR></TBODY></TABLE></TD>
<!-------------------demo2--------------------->
               <TD id=demo2 width="0"></TD>
        </TR></TBODY></TABLE></DIV>
<!--------------------demo end------------------>
<SCRIPT>
var dir=1//每步移动像素,大=快
var speed=1//循环周期(毫秒)大=慢
demo2.innerHTML=demo1.innerHTML
function Marquee(){//正常移动
 //alert(demo2.offsetWidth+"\n"+demo.scrollLeft)
 if (dir>0  && (demo2.offsetWidth-demo.scrollLeft)<=0) demo.scrollLeft=0
 if (dir<0 &&(demo.scrollLeft<=0)) demo.scrollLeft=demo2.offsetWidth
 demo.scrollLeft+=dir
 
 demo.onmouseover=function() {clearInterval(MyMar)}//暂停移动
 demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}//继续移动
}
function r_left(){if (dir=-1)dir=1}//换向左移
function r_right(){if (dir=1)dir=-1}//换向右移


var MyMar=setInterval(Marquee,speed)

</SCRIPT>
          </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
  </td>
  <td width="20"><img id="r_r" onClick="r_right()" src="http://www.cwydesign.com/effects/UploadFiles_7074/201008/2010081200382645.gif">
  </td>
 </tr>
</table>
</CENTER>
</BODY>
</HTML>

△运行 ☉预览 #复制 +收藏
特效说明:

图片左右滚动,带有左右方向控制

用到的图片:

    

  • 上一篇文章:
  • 下一篇文章:
  • 关于我们 - 联系我们 - 广告服务 - 在线投稿 - 友情链接 - 网站地图 - 版权声明
    CopyRight 2008-2010, CWYDESIGN.COM - 畅无忧设计, Inc. All Rights Reserved
    滇ICP备09005765号