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. 职业卖家淘宝美工教程,掌握技能无师自通 学到的不只是PS(共81节)附素材【无水印版】

    职业卖家淘宝美工教程,掌握技能无师自通 学到的不只是PS(共81节)附素材[无水印版]设计传说出品的专业课程是我们资深培训讲师精心录制的,只有视频教程和常用必备的插件,其他绝不掺和,如果你是职业卖家, ...

  2. Android Touch事件传递机制解析 (推荐)

    最近新闻列表里的下拉 down up  move 等等让我十分头疼 ,无意间看到了一篇非常不错的帖子,转载如下: 开篇语:最近程序在做一个小效果,要用到touch,结果整得云里面雾里的,干脆就好好把a ...

  3. Android Edittext点击全选输入框内容

  4. (转)Python实例手册

    原文地址:http://hi.baidu.com/quanzhou722/item/cf4471f8e23d3149932af2a7 实在是太好的资料了,不得不转 python实例手册 #encodi ...

  5. 【android】TabLayout文字闪烁问题

    安卓MD设计提供了一个非常酷炫的效果,TabLayout拿来做选项卡时非常合适的,但是在实际使用中发现22.2.1版本号的TabLayout在ViewPager滑动的时候会出现闪烁现象. 解决方法:在 ...

  6. CodeIgniter框架中关于URL(index.php)的那些事

    最近,在做自己的个人网站时,采用了轻量级的php框架CodeIgniter.乍一看上去,代码清晰简洁,MVC模型非常容易维护.开发时我采用的工具是Netbeans IDE 8.0,当然,本文的内容和开 ...

  7. 第六章 prototype和constructor

    首先我们看下面一段代码(第六章 01.htm) function myfun() //定义一个函数myfun { }; console.log(typeof (myfun.prototype)); c ...

  8. Android实现两个ScrollView互相联动,同步滚动的效果

    公众号:smart_android 作者:loonggg 点击"阅读原文",可查看更多内容和干货 最近在做一个项目,用到了两个ScrollView互相联动的效果,简单来说联动效果意 ...

  9. Linq之常见关键字

    目录 写在前面 系列文章 常见关键字 总结 写在前面 前面的几篇文章算是对linq的铺垫,从本篇开始将进行linq的语法及实践. 系列文章 Linq之Lambda表达式初步认识 Linq之Lambda ...

  10. JS表单学习笔记(思维导图)

    导图