巧用html中marquee属性实现舞动的文字
语法:<marquee> …</marquee> 使用移动属性marquee,不仅仅可以舞动你的文字,还可以应用于图片,表格等等。 <marquee direction=left>欢迎光临php中文网!</marquee> direction=left,表示方向。上面文字效果是“欢迎光临科讯青年学习频道!”从右向左移动!另外,方向还有right,up,down。 除了方向,我们还可以添加其他限制的元素: 移动的方式: 循环移动:loop=n(n,表示次数) 绕圈移动:behavior=scroll 只走一次:behavior=slide 来回移动:behavior=alternate 外观、字号:<font size=n>(n,变量) 对齐方式:align=top/middle/bottom 底色:bgcolor=Blue(预定义色彩,如:Black,Olive,Teal,Red,Blue,Maroon, Navy,Gray,Lime,Fuchsia,White,Green,Purple,Silver,Yellow,Aqua或16进制数码) 其它: 速度:scrollamount=n(n,变量) 延时:scrolldelay==n(n,变量) <marquee direction="向什么方向移动" height="移动区域高度" width="移动区域宽度" scrollamount="移动速度" onmouseover=this.stop() onmouseout=this.start()>" onmouseover 设置鼠标放在移动区域的时候暂停移动 onmouseout 鼠标离开的时候继续滚动 用marquee代码来实现文字的滚动与图片的滚动 今天在TAP知道那里看到滚动文字的设置了!好像是以前都不支持的。可能是我没有用过吧!呵呵 给大家看下效果吧! <marquee direction="up" loop="-1" scrollamount="4"> <p align="left"></p><center> <font color="#008000"></font></center><p align="left"> </p><center><p><font color="#ff6600">本站公告</font></p> <p><font color="#ff4500">欢迎来到小军资源</font></p> <p><font color="#ff4500">在此与你分享各个最新的免费资源与资讯,</font></p> <p><font color="#ff4500">希望你的喜欢,你的支持是我最大的动力!</font></p> <p><font color="#ff4500">如有什么建议一定得说出来!</font></p> <p><font color="#ff4500">本站资源来自网络,如对你造成侵权!</font></p> <p><font color="#ff4500"></font></p> <font color="#ff4500"><p><font color="#ff3300">谢谢你的支持,小军因你而精彩</font> </p></font></center><font color="#ff4500"></font></marquee> 效果二:文字往左边滚动 <marquee direction="lift" loop="-1" scrollamount="20" width="500" height="210"> <a href="http://jun51.tap.cn/" target="_blank"><img height="200" width="300" src="http://img011.photo.21cn.com/photos/mark/20110410/m620x800/CC6169D8EE67719C4299B0740123325E.jpg"/><img height="200" width="300" src="http://img011.photo.21cn.com/photos/mark/20110410/m620x800/EB965C39B9A8B63AE3908267DD6C45C8.jpg"/><img height="200" width="300" src="http://img003.photo.21cn.com/photos/mark/20080517/m620x800/676E5C63EA319EEABCCB6D03C19121D4.jpg"/> </marquee> 相关文章: marquee在HTML中的属性解析 marquee的详细用法解析 基于HTML标签marquee实现滚动效果的简单方法 |