网页制作图片特效,鼠标放上去图片出现内发光效果。希望是js特效。不要flash。谢谢

网页制作图片特效,鼠标放上去图片出现内发光效果。希望是js特效。不要flash。谢谢,第1张

JS没有发光的特效,不过你可以做两张,一张发光,一张不发光,然后用js替换
如:(鼠标放上去出现内发光效果,放开就不发光)
<input type="image" src="images/1gif" onmousemove="thissrc='images/2gif'" onmouseout="thissrc='images/1gif'" />

<html>
<head>
<title>title及alt提示特效</title>
<style type="text/css">
body{font-size:12px;color:#000000}
td{font-size:12px;color:#000000}
a:link{font-size:12px;color:#000000}
</style>
<script language="javascript">
var pltsPop=null;
var pltsoffsetX = 12; // d出窗口位于鼠标左侧或者右侧的距离;3-12 合适
var pltsoffsetY = 15; // d出窗口位于鼠标下方的距离;3-12 合适
var pltstitle="";
documentwrite('<div id=pltsTipLayer style="display: none;position: absolute; z-index:10001"></div>');
function pltsinits()
{
documentonmouseover = plts;
documentonmousemove = moveToMouseLoc;
}
function plts()
{ var o=eventsrcElement;
if(oalt!=null && oalt!=""){odypop=oalt;oalt=""};
if(otitle!=null && otitle!=""){odypop=otitle;otitle=""};
pltsPop=odypop;
if(pltsPop!=null && pltsPop!="" && typeof(pltsPop)!="undefined")
{
pltsTipLayerstyleleft=-1000;
pltsTipLayerstyledisplay='';
var Msg=pltsPopreplace(/\n/g,"<br>");
Msg=Msgreplace(/\0x13/g,"<br>");
var re=/\{([^\{])\}/ig;
if(!retest(Msg))pltstitle="『水木设计联盟』";
else{
re=/\{([^\{])\}()/ig;
pltsTitle=Msgreplace(re,"$1")+" ";
re=/\{([^\{])\}/ig;
Msg=Msgreplace(re,"");
Msg=Msgreplace("<br>","");}
var content =
'<table style="FILTER:alpha(opacity=90);border: 1px solid #cccccc" id="toolTipTalbe" cellspacing="1" cellpadding="0"><tr><td width="100%"><table bgcolor="#ffffff" cellspacing="0" cellpadding="0">'+
'<tr id="pltsPoptop"><td height="20" bgcolor="#0094bb"><font color="#ffffff"><b><p id="topleft" align="left">↖'+pltsTitle+'</p><p id="topright" align="right" style="display:none">'+pltsTitle+'↗</font></b></font></td></tr>'+
'<tr><td "+attr+" style="padding-left:10px;padding-right:10px;padding-top: 8px;padding-bottom:6px;line-height:140%">'+Msg+'</td></tr>'+
'<tr id="pltsPopbot" style="display:none"><td height="20" bgcolor="#0094bb"><font color="#ffffff"><b><p id="botleft" align="left">↙'+pltsTitle+'</p><p id="botright" align="right" style="display:none">'+pltsTitle+'↘</font></b></font></td></tr>'+
'</table></td></tr></table>';
pltsTipLayerinnerHTML=content;
toolTipTalbestylewidth=Mathmin(pltsTipLayerclientWidth,documentbodyclientWidth/22);
moveToMouseLoc();
return true;
}
else
{
pltsTipLayerinnerHTML='';
pltsTipLayerstyledisplay='none';
return true;
}
}
function moveToMouseLoc()
{
if(pltsTipLayerinnerHTML=='')return true;
var MouseX=eventx;
var MouseY=eventy;
var popHeight=pltsTipLayerclientHeight;
var popWidth=pltsTipLayerclientWidth;
if(MouseY+pltsoffsetY+popHeight>documentbodyclientHeight)
{
popTopAdjust=-popHeight-pltsoffsetY15;
pltsPoptopstyledisplay="none";
pltsPopbotstyledisplay="";
}
else
{
popTopAdjust=0;
pltsPoptopstyledisplay="";
pltsPopbotstyledisplay="none";
}
if(MouseX+pltsoffsetX+popWidth>documentbodyclientWidth)
{
popLeftAdjust=-popWidth-pltsoffsetX2;
topleftstyledisplay="none";
botleftstyledisplay="none";
toprightstyledisplay="";
botrightstyledisplay="";
}
else
{
popLeftAdjust=0;
topleftstyledisplay="";
botleftstyledisplay="";
toprightstyledisplay="none";
botrightstyledisplay="none";
}
pltsTipLayerstyleleft=MouseX+pltsoffsetX+documentbodyscrollLeft+popLeftAdjust;
pltsTipLayerstyletop=MouseY+pltsoffsetY+documentbodyscrollTop+popTopAdjust;
return true;
}
pltsinits();
</script>
</head>
<body>
链接提示效果:<a href=">

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/13406059.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-07-30
下一篇 2023-07-30

发表评论

登录后才能评论

评论列表(0条)

保存