<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 +
' /;</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" ></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>
新闻热点
疑难解答