1、高度可设定。

2、可滑出,但高度不可指定,只能左下角 or 右下角

 
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  2. <htmlxmlns="http://www.w3.org/1999/xhtml">

  3. <head>

  4. <metahttp-equiv="Content-Type"content="text/html; charset=GBK"/>

  5. </head>

  6. <body>

  7. <styletype="text/css">

  8. <!--

  9. #rbbox{

  10.    border:0px solid #f00;

  11.    width:180px;

  12.    height:0px;

  13.    margin:0px;

  14.    padding:0px;

  15.    overflow:hidden;

  16.    position:absolute;

  17.    left:0;     //right:0;

  18.    bottom:0;

  19. }

  20. .vipall{

  21.    border:0px solid #00f;

  22.    background:#360;

  23.    width:180px;

  24.    height:150px;

  25.    margin:0px;

  26.    padding:0px;

  27.    position:relative;

  28. }

  29. .vipclose{

  30.    border:0px solid #f00;

  31.    font-size:12px;

  32. }

  33. .vipclose a{

  34.    text-decoration:none;

  35.    color:#444;

  36. }

  37. .vipclose a:hover{

  38.    text-decoration:none;

  39. }

  40. -->

  41. </style>

  42. <divid="rbbox">

  43. <divclass="vipclose"><ahref="#"onclick="closeBox()">关闭</a></div>

  44. <ahref="http://xuqin.blog.51cto.com/"style="cursor:pointer"><divclass="vipall"></div></a>

  45. </div>

  46. <scriptlanguage="javascript"type="text/javascript">

  47. <!--

  48. window.onload=function(){showBox();setTimeout("closeBox()",300000)}  

  49. function showBox(o){  

  50. if (o==undefined) o=document.getElementById("rbbox");  

  51. oo.style.height=o.clientHeight+2+"px";  

  52. if (o.clientHeight<180) setTimeout(function(){showBox(o)},5);  

  53. }  

  54. function closeBox(){document.getElementById("rbbox").style.display="none";}

  55. -->

  56. </script>

  57. </body>

  58. </html>