运行下面的代码:
<marquee direction="down" width="400" height="80" bgcolor="#f6f6f6"> <marquee direction="right" width="300" height="80%"> 网页教学网欢迎您的光临! </marquee> </marquee>
再来添加个behavior="alternate"scroll:是这个参数的默认值,根据direction设置的方向滚动,文本到头的话再重新来过alternate:marquee的内容根据direction设置的方向滚动到达容器边缘后再按相反的方向滚动回来,周而复始,形成循环slid:marquee的内容根据direction设置的方向滚动,到边缘就停止不在滚动(唯一一次)
<marquee direction="up" width="350" height="80" behavior="alternate" bgcolor="#f6f688"> <marquee direction="left" width="300" height="100%" bdhavior="alternate"> 网页教学网关于marquee的另类用法 </marquee> </marquee>
更好的一种效果:
<table bgcolor="#EFEFEF"> <tr><td width="1" valign="top" > <marquee direction="down" behavior="alternate" scrollamount=1 height="60"> <marquee direction="right" scrollamount=4 behavior="alternate" width="468"> 网页教学网演示效果 </marquee> </marquee> </td> <td width="468"> <marquee direction="up" behavior="alternate" scrollamount=1 height="60"> <marquee direction="left" scrollamount=4 behavior="alternate" width="468"> 网页教学网关于marquee的另类用法 </marquee> </marquee> </td></tr></table>
Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved. 闵涛 E_mail:admin@mintao.net(欢迎提供学习资源)
鄂公网安备 42011102001154号
站长:MinTao ICP备案号:鄂ICP备11006601号-18