1. <HTML>
  2. <HEAD>
  3. <title>一种很酷的文字提示效果演示</title>
  4. <style>
  5. .tableBorder7{width:800;solid; background-color: #000000;}
  6. TD{font-family: 宋体;font-size: 12px;line-height : 15px ;}
  7. th{background-color: #f7f7f7;color: #000000;font-size: 12px;font-weight:bold;}
  8. th.th1{background-color: #333333;}
  9. td.TableBody7{background-color: #B1EA45;}
  10. </style>
  11. <script language="JavaScript">
  12. //more javascript from http://www.51it.org
  13. <!--
  14. var pltsPop=null;
  15. var pltsoffsetX = 10;   // 弹出窗口位于鼠标左侧或者右侧的距离;3-12 合适
  16. var pltsoffsetY = 15;  // 弹出窗口位于鼠标下方的距离;3-12 合适
  17. var pltsPopbg="#FFFFEE"; //背景色
  18. var pltsPopfg="#111111"; //前景色
  19. var pltsTitle="";
  20. document.write('<div id=pltsTipLayer style="display: none;position: absolute; z-index:10001"></div>');
  21. function pltsinits()
  22. {
  23. document.onmouseover   = plts;
  24. document.onmousemove = moveToMouseLoc;
  25. }
  26. function plts()
  27. {  var o=event.srcElement;
  28. if(o.alt!=null && o.alt!=""){oo.dypop=o.alt;o.alt=""};
  29. if(o.title!=null && o.title!=""){oo.dypop=o.title;o.title=""};
  30. pltsPop=o.dypop;
  31. if(pltsPop!=null&&pltsPop!=""&&typeof(pltsPop)!="undefined")
  32. {
  33. pltsTipLayer.style.left=-1000;
  34. pltsTipLayer.style.display='';
  35. var Msg=pltsPop.replace(/\n/g,"<br>");
  36. MsgMsg=Msg.replace(/\0x13/g,"<br>");
  37. var re=/\{(.[^\{]*)\}/ig;
  38. if(!re.test(Msg))pltsTitle="<font color=#ffffff>简介</font>";
  39. else{
  40. re=/\{(.[^\{]*)\}(.*)/ig;
  41. pltsTitle=Msg.replace(re,"$1")+" ";
  42. re=/\{(.[^\{]*)\}/ig;
  43. MsgMsg=Msg.replace(re,"");
  44. MsgMsg=Msg.replace("<br>","");}
  45. //var attr=(document.location.toString().toLowerCase().indexOf("list.asp")>0?"nowrap":"");
  46. var content =
  47. '<table style="FILTER:alpha(opacity=90) shadow(color=#bbbbbb,direction=135);" id=toolTipTalbe border=0><tr><td width="100%"><table class=tableBorder7 cellspacing="1" cellpadding="0" style="width:100%">'+
  48. '<tr id=pltsPoptop ><th height=18 valign=bottom class=th1 ><b><p id=topleft align=left><font color=#ffffff>↖</font>'+pltsTitle+'</p><p id=topright align=right style="display:none">'+pltsTitle+'<font color=#ffffff>↗</font></b></th></tr>'+
  49. '<tr><td "+attr+" class=tablebody7 style="padding-left:14px;padding-right:14px;padding-top: 6px;padding-bottom:6px;line-height:135%">'+Msg+'</td></tr>'+
  50. '<tr id=pltsPopbot style="display:none"><th height=18 valign=bottom class=th1><b><p id=botleft align=left><font color=#ffffff>↙</font>'+pltsTitle+'</p><p id=botright align=right style="display:none">'+pltsTitle+'<font color=#ffffff>↘</font></b></th></tr>'+
  51. '</table></td></tr></table>';
  52. pltsTipLayer.innerHTML=content;
  53. toolTipTalbe.style.width=Math.min(pltsTipLayer.clientWidth,document.body.clientWidth/2.2);
  54. moveToMouseLoc();
  55. return true;
  56. }
  57. else
  58. {
  59. pltsTipLayer.innerHTML='';
  60. pltsTipLayer.style.display='none';
  61. return true;
  62. }
  63. }
  64. function moveToMouseLoc()
  65. {
  66. if(pltsTipLayer.innerHTML=='')return true;
  67. var MouseX=event.x;
  68. var MouseY=event.y;
  69. //window.status=event.y;
  70. var popHeight=pltsTipLayer.clientHeight;
  71. var popWidth=pltsTipLayer.clientWidth;
  72. if(MouseY+pltsoffsetY+popHeight>document.body.clientHeight)
  73. {
  74. popTopAdjust=-popHeight-pltsoffsetY*1.5;
  75. pltsPoptop.style.display="none";
  76. pltsPopbot.style.display="";
  77. }
  78. else
  79. {
  80. popTopAdjust=0;
  81. pltsPoptop.style.display="";
  82. pltsPopbot.style.display="none";
  83. }
  84. if(MouseX+pltsoffsetX+popWidth>document.body.clientWidth)
  85. {
  86. popLeftAdjust=-popWidth-pltsoffsetX*2;
  87. topleft.style.display="none";
  88. botleft.style.display="none";
  89. topright.style.display="";
  90. botright.style.display="";
  91. }
  92. else
  93. {
  94. popLeftAdjust=0;
  95. topleft.style.display="";
  96. botleft.style.display="";
  97. topright.style.display="none";
  98. botright.style.display="none";
  99. }
  100. pltsTipLayer.style.left=MouseX+pltsoffsetX+document.body.scrollLeft+popLeftAdjust;
  101. pltsTipLayer.style.top=MouseY+pltsoffsetY+document.body.scrollTop+popTopAdjust;
  102. return true;
  103. }
  104. pltsinits();
  105. //-->
  106. </script>
  107. </HEAD>
  108. <BODY>
  109. <div title="醉别西楼醒不记,春梦秋云,聚散真容易。<br>斜月半窗还少睡。画屏闲展吴山翠。<br>衣上酒痕诗里字,点点行行,总是凄凉意。<br>红烛自怜无好计,夜寒空替人垂泪。">蝶恋花</div>
  110. </BODY>
  111. </HTML>

650) this.width=650;" border="0" alt="" src="http://img1.51cto.com/attachment/201203/102941546.png" />

漂亮的title提示信息的更多相关文章

  1. ztree2.6给菜单增加title提示信息[转]

    自定义数据格式的情况下(isSimpleData: true) 在setting中自定义一个属性如 remark:"remark", callback中调用函数 nodeCreat ...

  2. qTip2 精致的jQuery提示信息插件

    qTip2 精致的jQuery提示信息插件    出处:http://www.cnblogs.com/lwme/archive/2012/02/16/qtip2-jquery-plugin.html ...

  3. 转:zTree树控件key配置之title:zTree树节点名称过长如何省略显示且鼠标移入节点上能够显示全称

    当树节点的名称有些很长时,全部显示出来显得很拥挤的情况下,我们会想到用省略节点名称来代替,当鼠标移入节点时能够显示该节点的全称.这样我们应该如何做呢? 首先,我们要在树的节点内多增加一个属性用于设置该 ...

  4. 一款基于jQuery的漂亮弹出层

    特别提示:本人博客部分有参考网络其他博客,但均是本人亲手编写过并验证通过.如发现博客有错误,请及时提出以免误导其他人,谢谢!欢迎转载,但记得标明文章出处:http://www.cnblogs.com/ ...

  5. HTML语法介绍

    一 基本标签(块级标签和内联标签) <hn>: n的取值范围是1~6; 从大到小. 用来表示标题. <p>: 段落标签. 包裹的内容被换行.并且也上下内容之间有一行空白. &l ...

  6. body标签

    标签(空格分隔): body标签 body标签: 想要在网页上展示出来的内容一定要放在body标签中. 把我们之前那一段HTML代码贴过来,保存到一个HTML格式的文件中. <!DOCTYPE ...

  7. HTML语法分析

    什么是HTML htyper text markup language 即超文本标记语言HTML是一个网页的主体部分,也是一个网页的基础.因为一个网页可以没有样式,可以没有交互,但是必须要有网页需要呈 ...

  8. 前端开发-3-HTML-body标签

    body标签 h.p.a.ul.ol.div.img. 想要在网页上展示出来的内容一定要放在body标签中. 把我们之前海燕那一段HTML代码贴过来,保存到一个HTML格式的文件中. <!DOC ...

  9. 4-[HTML]-body常用标签1

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

随机推荐

  1. 使用POI getCell 获取空的单元格之后在使用的时候报 NullPointerException

    解决办法,在得到cell之后先判断cell是否为空,然后再进行逻辑处理. 得到的cell建议使用去除策略(如左对齐,居中等)的cell,不然有可能受到策略影响而导致结果异常. org.apache.p ...

  2. 用 eric6 与 PyQt5 实现python的极速GUI编程(系列01)--Hello world!

    [题记] 我是一个菜鸟,这个系列是我的学习笔记. PyQt5 出来有一段时间了, PyQt5 较之 PyQt4 有一些变化,而网上流传的几乎都是 PyQt4 的教程,照搬的话大多会出错. eric6 ...

  3. ubuntu 16.04 mysql 相关

    如何彻底卸载某一版本的数据库 彻底删除ubuntu下的mysql: 1.删除mysql的数据文件 sudo rm /var/lib/mysql/ -R 2.删除mqsql的配置文件 sudo rm / ...

  4. IOS开发之——keychain使用介绍 保护本地文件的安全

    iOS的keychain服务提供了一种安全的保存私密信息(密码,序列号,证书等)的方式.每个ios程序都有一个独立的keychain存储.从ios 3.0开始,跨程序分享keychain变得可行. 使 ...

  5. 工作随笔——CentOS6.4支持rz sz操作

    yum一句话解决: yum -y install lrzsz

  6. 7.HBase In Action 第一章-HBase简介(1.2.1 典型的网络搜索问题:Bigtable的起原)

    Search is the act of locating information you care about: for example, searching for pages in a text ...

  7. 成都普华永道税务开发的offer

    首先这是一个.net税务开发的offer,我是做开发的. 有没有人在成都普华永道的,最近收到普华永道的offer,如果有的话请联系我.想知道里面的情况.最想知道里面的加班情况,薪资还是有点诱惑的.毕竟 ...

  8. WebService学习过程中的心得和问题

    1.发布一个WebService 2.调用第三方提供的WebService服务

  9. Windows7下出现“不支持此接口”的解决方案

    今天学校里的辅导员突然找到我说Windows 7下什么文件夹都打不开了,提示“不支持此接口”.怀疑是病毒所致,但运行杀毒软件没有结果.重启也问题依旧. 上网查了之后找到了修复方法: 在命令行中输入fo ...

  10. wordpress中如何禁止或者屏蔽更新提示

    WordPress禁止,插件更新,主题更新,wordpress本身更新提示的方法 禁止wp更新 : open file "wordpress\wp-includes\update.php&q ...