走马灯特效及其应用
最近在博客上发现有人用走马灯的方法来装饰博客,如友情连接和文章标题等,有好多人问我怎么弄,这里简单的就不介绍了,现在介绍一些嵌套的走马灯代码Marquee的用法。
屏幕保护效果:
<marquee height="400" direction="up" width="500" bgcolor="#FFFFFF"> <marquee height="50" direction="left" width="100%"> <font style="font-size: 20px; color:#fff000">空菜BLOG</font> </marquee> </marquee>
效果演示:
滚动文字特效
加个参数behavior="alternate" 再看看效果scroll:Marquee 根据 direction 设置的方向滚动,文本滚到头以后再重头开始,这是默认值。
alternate:Marquee 的内容到达容器的边缘后又按照相反的方向滚动回来,周而复始,形成周期
slid:Marquee 根据 direction 设置的方向滚动,到边缘就停止滚动,不再重复就变成下面的:
<table> <tr> <td bgcolor=#FFFFFF width=468> <marquee direction="down" behavior="alternate" scrollamount=1 height="60"> <marquee direction="right" behavior="alternate" scrollamount=4 width="468"> 空菜BLOG</marquee> </marquee> </td> </tr> </table>
效果演示:
空菜BLOG
多嵌套
<table bgcolor="#FFFFFF"> <tr><td width="1" valign="top" > <marquee direction="down" behavior="alternate" scrollamount=1 height="60"> <marquee direction="right" scrollamount=4 behavior="alternate" width="468"> 空菜BLOG </marquee> </marquee> </td> <td width="468"> <marquee direction="up" behavior="alternate" scrollamount=1 height="60"> <marquee direction="left" scrollamount=4 behavior="alternate" width="468"> 空菜BLOG </marquee> </marquee> </td></tr></table>
效果演示
空菜BLOG 空菜BLOG
本文来自小强的BLOG 在此谢谢他了.
空菜BLOG制作秘籍 更多BLOG制作相关技术