zoukankan      html  css  js  c++  java
  • 漂亮的title提示信息

    1. <HTML> 
    2. <HEAD> 
    3. <title>一种很酷的文字提示效果演示</title> 
    4. <style> 
    5. .tableBorder7{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.  
    22. function pltsinits() 
    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(/ /g,"<br>"); 
    36.        MsgMsg=Msg.replace(/x13/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="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.  
    65. function moveToMouseLoc() 
    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. pltsinits(); 
    104. //--> 
    105. </script> 
    106. </HEAD> 
    107.  
    108. <BODY> 
    109. <div title="醉别西楼醒不记,春梦秋云,聚散真容易。<br>斜月半窗还少睡。画屏闲展吴山翠。<br>衣上酒痕诗里字,点点行行,总是凄凉意。<br>红烛自怜无好计,夜寒空替人垂泪。">蝶恋花</div> 
    110. </BODY> 
    111. </HTML> 

  • 相关阅读:
    敏捷开发感想
    团队分工
    My Partner‘s Code View
    课堂上面的练习
    APP测试用例
    Android App测试计划和设计测试矩阵
    BugReport-智慧农业APP
    图书管理系统的活动图和时序图
    图书管理系统用例图
    对图书管理系统5W1H的分析
  • 原文地址:https://www.cnblogs.com/umgsai/p/3908179.html
Copyright © 2011-2022 走看看