让人跌眼镜的Marquee用法

博客介绍了嵌套Marquee标签的使用,展示了屏幕保护效果的代码示例。还介绍了Marquee参数behavior的不同取值(scroll、alternate、slid)及其效果,并给出了不同参数设置下的嵌套Marquee代码示例,体现编写代码的乐趣。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Marquee都会用,嵌套的Marquee你试过?

来字经典论坛的沧海水朋友着实让人大跌眼镜:D

屏幕保护效果:

<marquee height="400" direction="up" width="500" bgcolor="#3366cc">
<marquee height="50" direction="left" width="100%">
<font style="font-size: 35px; color:#fff">MARQUEE</font>
</marquee>
</marquee>

再来个参数behavior="alternate"

scroll:Marquee根据direction设置的方向滚动,文本滚到头以后再重头开始,这是默认值。.
alternate:Marquee的内容到达容器的边缘后又按照相反的方向滚动回来,周而复始,形成周期
slid:Marquee根据direction设置的方向滚动,到边缘就停止滚动,不再重复

就变成下面的

<table>
<tr>
<td bgcolor=#cc3300 width=468>
<marquee direction="down" behavior="alternate" scrollamount=1 height="60">
<marquee direction="right" behavior="alternate" scrollamount=4 width="468">
我被墙撞回@_@!
</marquee>
</marquee>
</td>
</tr>
</table>
51js的小恐龙朋友继续发挥

<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>
</td></tr></table>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值