Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->网站设计 ->HTML/DHTML ->正文

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

来源:Linuxdby.com 作者:Webmaster 时间:2007-06-05 点击: [收藏] [投稿]

下面的效果别以为只有Flash才能做到,用Dreamweaver一样可以做!

首先建立一个层,放入文字并用上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语言:总结性笔记,谢谢支持   下一篇:网页编程安全漏洞全接触

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
Power by linux-cn.com 粤ICP备05006655号