首页
矢量素材
PNG图标
JS代码
网页小图标
网页素材
设计欣赏
广告达人
有趣新鲜
技术文档
懒人博客
懒人论坛
当前位置:
首页
>
JS代码
>
JS特效代码
>
文字特效
> 第1页
title及alt提示个性化特效
VIEW:589
来源:懒人图库
2009-05-30
<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; // 弹出窗口位于鼠标左侧或者右侧的距离;3-12 合适 var pltsoffsetY = 15; // 弹出窗口位于鼠标下方的距离;3-12 合适 var pltsTitle=""; document.write('<div id=pltsTipLayer style="display: none;position: absolute; z-index:10001"></div>'); function pltsinits() { document.onmouseover = plts; document.onmousemove = moveToMouseLoc; } function plts() { var o=event.srcElement; if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""}; if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""}; pltsPop=o.dypop; if(pltsPop!=null && pltsPop!="" && typeof(pltsPop)!="undefined") { pltsTipLayer.style.left=-1000; pltsTipLayer.style.display=''; var Msg=pltsPop.replace(/\n/g,"<br>"); Msg=Msg.replace(/\0x13/g,"<br>"); var re=/\{(.[^\{]*)\}/ig; if(!re.test(Msg))pltsTitle="『水木设计联盟』"; else{ re=/\{(.[^\{]*)\}(.*)/ig; pltsTitle=Msg.replace(re,"$1")+" "; re=/\{(.[^\{]*)\}/ig; Msg=Msg.replace(re,""); Msg=Msg.replace("<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>'; pltsTipLayer.innerHTML=content; toolTipTalbe.style.width=Math.min(pltsTipLayer.clientWidth,document.body.clientWidth/2.2); moveToMouseLoc(); return true; } else { pltsTipLayer.innerHTML=''; pltsTipLayer.style.display='none'; return true; } } function moveToMouseLoc() { if(pltsTipLayer.innerHTML=='')return true; var MouseX=event.x; var MouseY=event.y; var popHeight=pltsTipLayer.clientHeight; var popWidth=pltsTipLayer.clientWidth; if(MouseY+pltsoffsetY+popHeight>document.body.clientHeight) { popTopAdjust=-popHeight-pltsoffsetY*1.5; pltsPoptop.style.display="none"; pltsPopbot.style.display=""; } else { popTopAdjust=0; pltsPoptop.style.display=""; pltsPopbot.style.display="none"; } if(MouseX+pltsoffsetX+popWidth>document.body.clientWidth) { popLeftAdjust=-popWidth-pltsoffsetX*2; topleft.style.display="none"; botleft.style.display="none"; topright.style.display=""; botright.style.display=""; } else { popLeftAdjust=0; topleft.style.display=""; botleft.style.display=""; topright.style.display="none"; botright.style.display="none"; } pltsTipLayer.style.left=MouseX+pltsoffsetX+document.body.scrollLeft+popLeftAdjust; pltsTipLayer.style.top=MouseY+pltsoffsetY+document.body.scrollTop+popTopAdjust; return true; } pltsinits(); </script> </head> <body> 链接提示效果:<a href="http://www.lanrentuku.com/" target="_blank" title="title及alt提示特效,本程序由水木设计联盟整理推荐,希望大家喜欢">一个很酷的鼠标悬停特效,但有问题指教,我想知道怎么控制悬停时间</a> </body> </html>
提示:您可以先修改部分代码再运行,复制代码和保存代码功能在Firefox下无效。
↑上一篇:
通用滑动门类
↓下一篇:
鼠标点击展开关闭层效果
打字效果代码
字号缩放代码
CSS凹陷文字
超出的文字用省略,用…代替
如何将链接的下划线做成虚线?
打字效果的带链接的新闻标题
用CSS实现超长字段被省略的简单方法
关键词高亮显示
title及alt提示个性化特效
广告代码
共
338
个JS广告代码
››全部
焦 点 图(156)
全屏广告(11)
对联广告(6)
在线客服(5)
相册代码(39)
菜单导航(32)
TAB标签(13)
悬浮漂浮(3)
视频播放(4)
图片特效(23)
翻牌书角(7)
其他代码(39)
特效代码
共
273
个JS特效代码
››全部
导航菜单(55)
表单按钮(43)
文字特效(11)
表格图层(35)
图片特效(15)
时间日期(21)
滚动代码(11)
窗口特效(8)
颜色背景(2)
网站常用(42)
CSS样式(13)
其他特效(17)
最近浏览过的特效代码
更多››
关于我们
-
版权声明
-
广告服务
-
懒人西西
-
RSS订阅
-
工作机会
-
网站地图
-
友情链接
-
联系我们
-
在线留言
Copyright © 2006-2009
lanrentuku.com
All Rights Reserved.
-
京ICP备08001501号