marquee 滚动总结

1.     向左滚动代码:

<marquee scrollAmount=3 width=900 style="color:#FF0000; font-size:12px" align="texttop" height="14">第二期网上开店免费培训课程将在经七纬一济南日报大厦20楼会议室举行,如果你想通过网络实现创业梦想请拨打咨询电话:0531-82886496预约课程!

</marquee>

<marquee scrollAmount=2 width=300>
文字滚动代码</marquee>

    2.
图片向左滚动代码:

         

<MARQUEE onmouseover=this.stop() onmouseout=this.start() scrollAmount=1 scrollDelay=4 width=100% align="left"><img src="images/333/haha2.jpg" width="146" height="132">

<img src="images/333/haha1.jpg" width="146" height="132">

<img src="images/333/haha3.jpg" width="146" height="132">

<img src="images/333/haha4.jpg" width="146" height="132">

<img src="images/333/haha5.jpg" width="146" height="132">

</MARQUEE>

无间隙图片向左滚动

 

<DIV id=demo

                  style="OVERFLOW: hidden; WIDTH: 650px; COLOR: #c04020; HEIGHT: 165px">

                  <TABLE height="94" border=0 align=left cellPadding=0 cellspace="0">

                    <TBODY>

                      <TR>

                        <TD height="92" id=demo1>

                          <TABLE width="800" height="90"

                          border=0 cellPadding=2 cellSpacing=0>

                            <TBODY>

                              <TR>

                                <TD width=0 rowspan="2"></TD>

                                <TD width="100" height="74" align="center"><A

                              href="/hotel/hotel.asp?h_name=%C8%AB%D7%DC%B9%F3%B1%F6%C2%A5"

                              target=_top><IMG

                              src="http://www.2008trip.com/ad/hotel/move/images/qzgbl.jpg" alt="青岛汇泉王朝大酒店" width="98" height=74 border="0" class=img02></A></TD>

                                <TD width="100" align="center"><A

                              href="/hotel/hotel.asp?h_name=%C7%E0%B5%BA%B9%F3%B6%BC%B4%F3%B7%B9%B5%EA"

                              target=_top><IMG

                              src="http://www.2008trip.com/ad/hotel/move/images/qdgdd.jpg" alt="青岛汇泉王朝大酒店" width="98" height=74 border="0" class=img02></A></TD>

                                <TD width="100" align="center"><A

                              href="/hotel/hotel.asp?h_name=%C7%E0%B5%BA%D6%D0%B8%DB%B4%F3%CF%C3"

                              target=_top><IMG

                              src="http://www.2008trip.com/ad/hotel/move/images/zgds.jpg" alt="青岛东晖国际大酒店(原华美达酒店)" width="98" height=74 border="0" class=img02></A></TD>

                                <TD width="100" align="center"><a

                              href="/hotel/hotel.asp?h_name=%C7%E0%B5%BA%BB%AA%C4%DC%B1%F6%B9%DD"

                              target=_top><img

                              src="http://www.2008trip.com/ad/hotel/move/images/hnbg.jpg" alt="青岛丽晶大酒店" width="100" height=74 border="0" class=img02></a></TD>

                                <TD width="100" align="center"><A

                              href="/hotel/hotel.asp?h_name=%C7%E0%B5%BA%CF%E3%E9%BF%C0%F6%C9%E1%C9%CC%CE%F1%BE%C6%B5%EA"

                              target=_blank><IMG

                              src="http://www.2008trip.com/ad/hotel/move/images/xxls.jpg" alt="青岛饭店" width="100" height=74 border="0" class=img02></A></TD>

                                <TD width="100" align="center"><A

                              href="/hotel/hotel.asp?h_name=%C7%E0%B5%BA%B6%AB%B7%BD%B7%B9%B5%EA"

                              target=_top><IMG

                              src="http://www.2008trip.com/ad/hotel/move/images/dffd.jpg" alt="青岛香格里拉大饭店" width="98" height=74 border="0" class=img02></A></TD>

                                <TD width="100" align="center"><A

                              href="/hotel/hotel.asp?h_name=%C7%E0%B5%BA%BB%B7%B5%BA%B4%F3%BE%C6%B5%EA"

                              target=_blank><IMG

                              src="http://www.2008trip.com/ad/hotel/move/images/hddjd.jpg" alt="青岛泛海名人酒店" width="98" height=74 border="0" class=img02></A></TD>

                                <TD width="100" align="center"><A

                              href="/hotel/hotel.asp?h_name=%C7%E0%B5%BA%B1%B1%BA%A3%B1%F6%B9%DD"

                              target=_blank><IMG

                              src="http://www.2008trip.com/ad/hotel/move/images/bhbg.jpg" alt="青岛泛海名人酒店" width="98" height=75 border="0" class=img02></A></TD>

                                <TD width=0 rowspan="2"></TD>

                              </TR>

                              <TR>

                                <TD height="16" align="center"><a href="/hotel/hotel.asp?h_name=%C8%AB%D7%DC%B9%F3%B1%F6%C2%A5"><font color="#FFFFFF">全总贵宾楼</font></a></TD>

                                <TD align="center"><a href="/hotel/hotel.asp?h_name=%C7%E0%B5%BA%B9%F3%B6%BC%B4%F3%B7%B9%B5%EA"><font color="#FFFFFF">青岛贵都大饭店</font></a></TD>

                                <TD align="center"><a href="/hotel/hotel.asp?h_name=%C7%E0%B5%BA%D6%D0%B8%DB%B4%F3%CF%C3"><font color="#FFFFFF">青岛中港大厦</font></a></TD>

                                <TD align="center"><a href="/hotel/hotel.asp?h_name=%C7%E0%B5%BA%BB%AA%C4%DC%B1%F6%B9%DD"><font color="#FFFFFF">青岛华能宾馆</font></a></TD>

                                <TD align="center"><a href="/hotel/hotel.asp?h_name=%C7%E0%B5%BA%CF%E3%E9%BF%C0%F6%C9%E1%C9%CC%CE%F1%BE%C6%B5%EA"><font color="#FFFFFF">香榭丽舍商务酒店</font></a></TD>

                                <TD align="center"><a href="/hotel/hotel.asp?h_name=%C7%E0%B5%BA%B6%AB%B7%BD%B7%B9%B5%EA"><font color="#FFFFFF">青岛东方饭店</font></a></TD>

                                <TD align="center"><a href="/hotel/hotel.asp?h_name=%C7%E0%B5%BA%BB%B7%B5%BA%B4%F3%BE%C6%B5%EA"><font color="#FFFFFF">青岛环岛大酒店</font></a></TD>

                                <TD align="center"><a href="/hotel/hotel.asp?h_name=%C7%E0%B5%BA%B1%B1%BA%A3%B1%F6%B9%DD"><font color="#FFFFFF">青岛北海宾馆</font></a></TD>

                              </TR>

                            </TBODY>

                          </TABLE></TD>

                        <TD id=demo2 width=1></TD>

                      </TR>

                    </TBODY>

                  </TABLE>

                </DIV>

                <SCRIPT>

  var speed=15//速度数值越大速度越慢

  demo2.innerHTML=demo1.innerHTML

  function Marquee(){

  if(demo2.offsetWidth-demo.scrollLeft<=0)

  demo.scrollLeft-=demo1.offsetWidth

  else{

  demo.scrollLeft++

  }

  }

  var MyMar=setInterval(Marquee,speed)

  demo.onmouseover=function() {clearInterval(MyMar)}

  demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}

  </SCRIPT>

你可能感兴趣的:(总结)