无忧源码-网页特效 为广大网页制作爱好者提供学习、交流场所。在这里你可以找到背景特效、图象特效、时间日期特效、状态栏特效等各种网页特效。这些特效可以让你的网页变得更加美丽,从而吸引更多的网友访问你的网站。

网站首页 常用软件 站长工具 网页特效 网页配色 网页模板 背景音乐 杀毒频道 娱乐频道 访客留言
  特效分类

  点击排行 更多..
  不错的下拉菜单
  实用下拉导航条
  点击图片从而改变网页背景图..
  腾讯QQ网页在线客服,随网页..
  经典实用的触发型导航菜单
  超强论坛灌水工具---写大字板..
  腾讯QQ网页在线客服,隐藏在..
  通过滤镜实现的发光字体
  非常棒的绿色下拉透明菜单
  星星从背景中飞出
  页面内的超级酷浮动窗口
  Flash和JS实现的图片幻灯片切..


  推荐特效 更多..
  仿yahoo首页特色服务内容切换..
  可关闭并且能最大化的用层模..
  数字选中放大
  模仿3D的消息,太酷了!
  可以任意编辑的动态表格(特别..
  CSS超酷网页导航实例!网页导..
  效果直逼flash的css+div+js菜..
  网易娱乐头图新闻代码,推荐..
  类似与QQ的好友之类的树型菜..
  各种用途的按钮大集合
  用CSS设计的导航实例
  用CSS实现的一张图完成的导航..
您的位置:首页 >> 网页特效 >>  文本特效 >  模仿3D的消息,太酷了!
模仿3D的消息,太酷了!
[ 发布:风中舞 | 来源:本站整理 | 时间:2007-8-29 17:03:02 | 次 ]      [复制]

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网页特效|wuym.com/js|---模仿3D的消息,太酷了!</title>
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
<style type="text/css">
v\:* { behavior: url(#default#VML); }
</style>
</head>

<body>
<h3>
  <script type="text/javascript">

// Add as many messages as you like
var message=new Array("网页特效", "尽在网页特效酷 wuym.com/Js", "文本特效")

// 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>
</body>
</html>


请将上面的代码复制到下面的文本框中进行预览     
         
上一个特效:向上滚动图片的特效
 特效: 模仿3D的消息,太酷了! 的评论   我要评论...
 
关于本站 | 广告合作 | 免责声明 | 网站帮助 | 网站地图  | 滇ICP备06001292号

Copyright ©2005 - 2008 wuym.com.All Rights Reserved.