4种提示框效果

[晴 November 22, 2008 20:43 | by baobao ]
| |
<head>
<title>图像效果演示</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
/*
舜子制作
Made by PuterJam
*/
//--初始化变量--
var rT=true;//允许图像过渡
var bT=true;//允许图像淡入淡出
var tw=150;//提示框宽度
var endaction=false;//结束动画

var ns4 = document.layers;
var ns6 = document.getElementById && !document.all;
var ie4 = document.all;
offsetX = 0;
offsetY = 20;
var toolTipSTYLE="";
function initToolTips()
{
  if(ns4||ns6||ie4)
  {
    if(ns4) toolTipSTYLE = document.toolTipLayer;
    else if(ns6) toolTipSTYLE = document.getElementById("toolTipLayer").style;
    else if(ie4) toolTipSTYLE = document.all.toolTipLayer.style;
    if(ns4) document.captureEvents(Event.MOUSEMOVE);
    else
    {
      toolTipSTYLE.visibility = "visible";
      toolTipSTYLE.display = "none";
    }
    document.onmousemove = moveToMouseLoc;
  }
}
function toolTip(msg, fg, bg)
{
  if(toolTip.arguments.length < 1) // hide
  {
    if(ns4)
    {
    toolTipSTYLE.visibility = "hidden";
    }
    else
    {
      //--图象过渡,淡出处理--
      if (!endaction) {toolTipSTYLE.display = "none";}
      if (rT) document.all("msg1").filters[1].Apply();
      if (bT) document.all("msg1").filters[2].Apply();
      document.all("msg1").filters[0].opacity=0;
      if (rT) document.all("msg1").filters[1].Play();
      if (bT) document.all("msg1").filters[2].Play();
      if (rT){
      if (document.all("msg1").filters[1].status==1 || document.all("msg1").filters[1].status==0){  
      toolTipSTYLE.display = "none";}
      }
      if (bT){
      if (document.all("msg1").filters[2].status==1 || document.all("msg1").filters[2].status==0){  
      toolTipSTYLE.display = "none";}
      }
      if (!rT && !bT) toolTipSTYLE.display = "none";
      //----------------------
    }
  }
  else // show
  {
    if(!fg) fg = "#777777";
    if(!bg) bg = "#eeeeee";
    var content =
    '<table id="msg1" name="msg1" border="0" cellspacing="0" cellpadding="1" bgcolor="' + fg + '" class="trans_msg"><td>' +
    '<table border="0" cellspacing="0" cellpadding="3" bgcolor="' + bg +
    '"><td width=' + tw + '><font face="Arial" color="' + fg +
    '" size="-2">' + msg +
    '&nbsp\;</font></td></table></td></table>';

    if(ns4)
    {
      toolTipSTYLE.document.write(content);
      toolTipSTYLE.document.close();
      toolTipSTYLE.visibility = "visible";
    }
    if(ns6)
    {
      document.getElementById("toolTipLayer").innerHTML = content;
      toolTipSTYLE.display='block'
    }
    if(ie4)
    {
      document.all("toolTipLayer").innerHTML=content;
      toolTipSTYLE.display='block'
      //--图象过渡,淡入处理--
      var cssopaction=document.all("msg1").filters[0].opacity
      document.all("msg1").filters[0].opacity=0;
      if (rT) document.all("msg1").filters[1].Apply();
      if (bT) document.all("msg1").filters[2].Apply();
      document.all("msg1").filters[0].opacity=cssopaction;
      if (rT) document.all("msg1").filters[1].Play();
      if (bT) document.all("msg1").filters[2].Play();
      //----------------------
    }
  }
}
function moveToMouseLoc(e)
{
  if(ns4||ns6)
  {
    x = e.pageX;
    y = e.pageY;
  }
  else
  {
    x = event.x + document.body.scrollLeft;
    y = event.y + document.body.scrollTop;
  }
  toolTipSTYLE.left = x + offsetX;
  toolTipSTYLE.top = y + offsetY;
  return true;
}

</script>
<style  type="text/css">
<!--
.trans_msg
    {
    filter:alpha(opacity=100,enabled=1) revealTrans(duration=.2,transition=1) blendtrans(duration=.2);
    }
-->
</style>
</head>
<script>
</script>
<body>
<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
<p>
  <script>initToolTips()</script>
</p>
<p><font face="Arial"><a href="#" onMouseOver="toolTip('欢迎访问Blyesky的blog<br>希望你喜欢这里<br>^_^')" onMouseOut="toolTip()">效果1</a></font>
  <font face="Arial"> <a href="#" onMouseOver="toolTip('你要吗,好好用的哦真的', '#FFFF00', 'red')" onMouseOut="toolTip()">效果2</a></font>
  <font face="Arial"> <a href="#" onMouseOver="toolTip('这是个好东东<br>你说呢<br>哈哈', '#FFFF00', 'orange')" onMouseOut="toolTip()">效果3</a></font>
  <font face="Arial"> <a href="#" onMouseOver="toolTip('<marquee>跑啊!!跑</marquee>', '#FFFF00', 'orange')" onMouseOut="toolTip()">效果4</a></font>
</p>
</body>

∷∷最新日志∷∷ ∷∷随便看看∷∷ ∷∷热门关注∷∷
Win7取消 每次打...
PS排字教程 偷走了...
上海国际嘉年华简单攻...
【转】我来给你们分析...
简单步骤实现PS+D...
招募女生博客横幅广告...
PS古风成签教程&#...
中国高中排名TOP5...
Flashfxp&#...
Photoshop调...
|落 花 ...
20~30岁,我拿十...
【繁华落尽 如梦无痕...
加拿大留学or移民你...
子小超 淘宝卖家 这...
精美日本像素娃娃
网页播放器代码
为你吃狂by芃羽.t...
可爱型插画
韩国可爱像素
对于今早得无法访问表...
七堇年 「爲了忘卻的...
超漂亮的游戏
很干净的静物
可爱像素小动物~青蛙...
GA-KO时针第3弹
cyworld08....
春 夏 秋 冬 淡雅...
好多流口水的甜点&#...
SDFZMUN201...
色女专递|...
Photoshop调...
加拿大留学or移民你...
|落 花 ...
蝴蝶结制作教程...
20~30岁,我拿十...
【繁华落尽 如梦无痕...
百余张19*19韩国...
英语即兴演讲技巧&#...
Illustrato...
中国高中排名TOP5...
Flashfxp&#...
PS古风成签教程&#...
色女专递|...
简单步骤实现PS+D...
Creative Commons License
Creative Commons License
本作品适用 署名-非商业性-禁止演绎 作品 CC 2.5 中国 并依循所适用的授权条款.
微笑布偶 - 当您转载时请保留作者信息 本站原创作品转载请留言同意后再转 谢谢
特效代码 | 评论(0) | 引用(0) | 阅读(801) ·°∴ ☆..·°.·°∴ ☆..·°Let‘s smile~Today is another nice day!.·°∴ ☆..·°.·°∴ ☆



谢谢各位对偶的支持 有时间要在下面留言哦~↓