电脑爱好者,提供IT资讯信息及各类编程知识文章介绍,欢迎大家来本站学习电脑知识。 最近更新 | 联系我们 RSS订阅本站最新文章
电脑爱好者
站内搜索: 
当前位置:首页>> HTML>>巧妙实现很酷的动态背景文字:

巧妙实现很酷的动态背景文字

来源:远方网络 | 2005-12-28 9:32:58 | (有2601人读过)

首先建立一个层,放入文字并用上mask滤镜:

<div id="Layer1" style="font:40pt Arial Black;filter:mask(color=white);position:absolute; left:0px; top:0px; width:508px; height:120px; z-index:2">

再建立一个层,写入<marquee>:

<marquee behavior=scroll direction=right width=508 height=120 scrollamount=4 scrolldelay=0 >

最后插入图片即可!

全部的代码:

<html>
<head>
<title>很酷的动态背景文字</title>
</head>
<body bgcolor="#FFFFFF" text="#000000" topmargin=0 leftmargin=0>
<div id="Layer1" style="font:40pt Arial Black;filter:mask(color=white);position:absolute; left:0px; top:0px; width:508px; height:120px; z-index:2">
<p>Dreamweaver</p>
</div>
<div id="Layer2" style="position:absolute; left:0px; top:0px; width:508px; height:120px; z-index:1">
<marquee behavior=scroll direction=right width=508 height=120 scrollamount=4 scrolldelay=0 >
<script language=javascript>
for(t=1;t<=1000;t++)
document.write("<img src=http://www.ccidnet.com/school/zhuan/3d/back.jpg>")
</script>
</marquee>
</div>
</body>
</html>
HTML热门文章排行
网站赞助商
购买此位置

 

关于我们 | 网站地图 | 文档一览 | 友情链接| 联系我们

Copyright © 2003-2024 电脑爱好者 版权所有 备案号:鲁ICP备09059398号