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. The ServiceClass object does not implement the required method in the following form: OMElement sayHello(OMElement e)

    今天遇到一件诡异的事情,打好的同一个aar包,丢到测试环境tomcat,使用soapui测试,正常反馈结果. 丢到本地tomcat,使用soapui测试,始终报以下错误. <soapenv:En ...

  2. Web API路由和动作选择

    前言 本文描述ASP.NET Web API如何把一个HTTP请求路由到控制器的一个特定的Action上.关于路由的总体概述可以参见上一篇教程 http://www.cnblogs.com/aehyo ...

  3. C#操作JSON

    http://www.cnblogs.com/LiZhiW/p/3624729.html C#操作JSON 1. .NET对JSON的支持介绍............................. ...

  4. python数字图像处理(7):图像的形变与缩放

    图像的形变与缩放,使用的是skimage的transform模块,函数比较多,功能齐全. 1.改变图片尺寸resize 函数格式为: skimage.transform.resize(image, o ...

  5. Linux基础入门

    第一节,linux系统简介 一.实验内容 了解 Linux 的历史,Linux 与 Windows 的区别等入门知识. 二.实验要求 阅读linux简介与历史 三.实验步骤 (一).Linux 为何物 ...

  6. Linux及安全——ELF实践

    Linux及安全——ELF实践  一.分析ELF文件头 二.通过文件头找到section header table,理解内容 三.通过section header table 找到各section 四 ...

  7. 软件工程(GZSD2015)第二次作业文档模板

    题目: (此处列出题目) 需求分析: 基本功能 基本功能点1 基本功能点2 ... 扩展功能(可选) 高级功能(可选) 设计 设计点1 设计点2 ... 代码实现 // code here 程序截图 ...

  8. IOS开发之——意见反馈UITextView的使用+不能输入字符输入

    @interface DMFeedbackViewController ()<UITextViewDelegate,UIAlertViewDelegate>@property (nonat ...

  9. EasyUI实战经验总结,给有需要的人

    最近公司培训EasyUI,就做下总结吧,给有需要的人. 1.最常用的表格 <div class="easyui-panel" data-options="regio ...

  10. JS开发HTML5游戏《神奇的六边形》(三)

    近期出现一款魔性的消除类HTML5游戏<神奇的六边形>,今天我们一起来看看如何通过开源免费的青瓷引擎(www.zuoyouxi.com)来实现这款游戏. (点击图片可进入游戏体验) 因内容 ...