• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
道道前端
daodaoweb
博客园    首页       联系   管理    订阅  订阅

字幕滚动

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>公告滚动JS代码</title>
</head>
<body>
<div align="center">
<table border="1" width="206" cellspacing="0" cellpadding="0" style="border-collapse: collapse" height="90" id="table1">
<tr>
<td valign="top">
<MARQUEE onmouseover=this.stop() onmouseout=this.start() scrollAmount=1 scrollDelay=100 direction=left height="99%">
<TABLE cellSpacing=0 cellPadding=0 width="95%" align=center border=0>
<TBODY>
<TR>
<TD vAlign=top height=120>
<P style="LINE-HEIGHT: 150%;font-size:9pt"><FONT color=#000033>·<A href="#" >欢迎您光临!</A></FONT><BR><FONT color=#000033>·<A
href="#">更多很棒的源代码...</A></FONT><BR><FONT color=#000033>·<A
href="#">一个学习型的源码网站... </A></FONT><BR><FONT color=#000033>·<A href="#">如果有建议请提交给我们... </A></FONT><BR><FONT color=#000033>·<A href="#">非常感谢大家经常光顾</A></FONT><BR><FONT color=#000033>·<A href="#">再次感谢大家,再见</A></FONT>
</TD>
</TR>
</TBODY>
</TABLE>
</MARQUEE>
</td>
</tr>
</table>
</div>
</body>
</html>

 

scrollAmount:表示速度,值越大速度就越快,默认6,建议1-3;

width,height:设置滚动区域大小,特别是垂直滚动的时候一定要设置height;

direction:滚动的方向,up down left right;

scrollDelay:用来控制速度,值越大,速度越慢,默认90,通常不需要设置。

behavior:用来控制属性,默认为循环滚动,alternate交替滚动,slide幻灯片滚动,滚动一次,就停止滚动

 

posted @ 2013-10-17 10:58  道道前端  阅读(165)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3