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

王朝other·作者佚名  2006-11-24
窄屏简体版  字體: |||超大  

下面的效果别以为只有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>

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航