·
网页特效库
·
网页工具库
背景按钮
导航特效
图片特效
文本特效
时间特效
状态特效
另类特效
网页制作
网站首页
< 后退
|
收藏网页特效库
推荐网页特效
购物网站的导航效果,推荐!
向上下左右滚动图片的特效
超级变态广告代码
设为首页
加入收藏夹
防止选择和复制
新浪博客的提示窗口,推荐!
推荐网页工具
在线html编辑器
在线CSS编辑器
滚动条颜色生成器
弹出窗口生成器
网页加密解密工具
汉字转换成拼音工具
文本繁简体转换工具
您的位置:
网页特效库
>>
网页文本特效
>> 太酷了!模仿3D的消息
查看此特效演示
太酷了!模仿3D的消息
把如下代码复制到<head>与</head>之间
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/> <style type="text/css"> v\:* { behavior: url(#default#VML); } </style>
把如下代码复制到<body>与</body>之间
<h3> <script type="text/javascript"> // Add as many messages as you like var message=new Array("网页特效", "尽在网页特效库butong.net", "背景特效", "按钮特效") // Set the outline-color. Add as many colors as you like var outlinecolor=new Array("black", "black") // Set fillcolors 1. Add as many colors as you like var fillcolor1=new Array("gray", "green", "white", "green") // Set fillcolors 2. Add as many colors as you like var fillcolor2=new Array("blue", "olive", "black", "lime") // Set the letter marking the circle var circlemark=new Array("-") // Set the width of the outline var strkweight=2 // Set the waiting time between the messages (seconds) var pause=2 // Set the strength of the opacity (transparency of letters) var strengthopacity="60%" // Set the size of the circle (values range from 0.1 to 1) var circlesize=0.5 // Always keep messages in view even if page is scrolled? (DD added option) var keepinview="yes" // Do not edit below this line function ietruebody(){ //Dynamicdrive added function return (document.compatMode!="BackCompat")? document.documentElement : document.body } var outerwidth=ietruebody().clientWidth var outerheight=ietruebody().clientHeight var innerwidth=Math.floor(circlesize*outerwidth) var innerheight=Math.floor(circlesize*outerheight) var posleft=(outerwidth-innerwidth)/2 var postop=(outerheight-innerheight)/2 var path=new Array() var i_message=0 var i_outlinecolor=0 var i_fillcolor1=0 var i_fillcolor2=0 var i_messagelength=0 var longestmessage=0 pause*=1000 var ie=document.getElementById&&document.all?1:0 for (i=0;i<=message.length-1;i++) { if (message[i].length>longestmessage) { longestmessage=message[i].length } longestmessage+=4 } for (i=0;i<=message.length-1;i++) { var emptyspace="" var i_emptyspace=(longestmessage-message[i].length)/2 for (ii=0;ii<=i_emptyspace;ii++) { emptyspace+=circlemark } message[i]=emptyspace+" "+message[i]+" "+emptyspace } function changeform() { if (keepinview=="yes") //DD added document.getElementById("roofid").style.top=ietruebody().scrollTop //DD added if (i_outlinecolor >= outlinecolor.length) {i_outlinecolor=0} if (i_fillcolor1 >= fillcolor1.length) {i_fillcolor1=0} if (i_fillcolor2 >= fillcolor2.length) {i_fillcolor2=0} document.getElementById('strokeid').color=outlinecolor[i_outlinecolor] document.getElementById('fillid').color=fillcolor1[i_fillcolor1] document.getElementById('fillid').color2=fillcolor2[i_fillcolor2] if (i_message < message.length) {tick()} else {document.getElementById('textpathid').string="" document.getElementById("roofid").style.display="none" //DD added } } function tick() { if (i_messagelength <= message[i_message].length) { var messagestringend="" var messagestring=message[i_message].substring(0, i_messagelength)+messagestringend document.getElementById('textpathid').string=messagestring var timer=setTimeout("tick()",50) i_messagelength++ } else { clearTimeout(timer) i_messagelength=0 i_message++ i_outlinecolor++ i_fillcolor1++ i_fillcolor2++ var timer=setTimeout("changeform()",pause) } } if (ie) { document.write('<div id="roofid" style="position:absolute;left:0px;top:0px;width:'+outerwidth+'px;height:'+outerheight+'px;overflow:hidden;">') document.write('<v:oval id="tc" style="position:absolute;top:'+postop+'px;left:'+posleft+'px;width:'+innerwidth+'px;height:'+innerheight+'px">') document.write('<v:shadow on="t" opacity="'+strengthopacity+'"/>') document.write('<v:stroke id="strokeid" weight="'+strkweight+'pt" color="blue"/>') document.write('<v:fill id="fillid" on="True" color="'+fillcolor1[0]+'" color2="'+fillcolor2[0]+'" opacity="'+strengthopacity+'" opacity2="'+strengthopacity+'" type="gradient"/>') document.write('<v:path textpathok="t"/>') document.write('<v:textpath id="textpathid" on="t" id="mytp" style="font-family:\'Arial Black\'; " fitpath="t" string=""/>') document.write('</v:oval></div>') if (window.attachEvent) //DD added code window.attachEvent("onload", changeform) //DD added code else window.onload=changeform } </script></h3>
使用说明:代码中"var message=new Array()"括号中的值为消息的内容,内容用逗号相隔,依次变换。
上一个特效:
在Textarea中滚动的字幕
返回列表
下一个特效:
酷毙!文本定位和查找
关于我们
|
联系本站
|
免责声明
|
版权声明
|
网站地图
|
友情链接
|
鄂ICP备05023174号
Copyright © 2008
www.butong.net
.All Rights Reserved.