复制代码
      
        
          - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
          
 
          -         "http://www.w3.org/TR/html4/loose.dtd">
          
 
          - <html>
          
 
          - <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
          
 
          - <head>
          
 
          -     <meta http-equiv="Content-Type" content="text/html;charset=GBK"/>
          
 
          -     <title></title>
          
 
          -     <style type="text/css">
          
 
          -         html, body {
          
 
          -             margin: 0px;
          
 
          -         }
          
 
          -         #bar_left {
          
 
          -             z-index: 9999;
          
 
          -             top: 500px;
          
 
          -             left: 300px;
          
 
          -             position: absolute;
          
 
          -             width: 80px;
          
 
          -             height: 20px;
          
 
          -             float: left;
          
 
          -             border-width: 1px 1px 1px 1px;
          
 
          -             border-style: solid;
          
 
          -             border-top-color: #333333;
          
 
          -             border-left-color: #333333;
          
 
          -             border-bottom-color: #333333;
          
 
          -             border-right-color: #333333;
          
 
          -             background: white;
          
 
          -             cursor: pointer;
          
 
          -         }
          
 
          -         #bar_right {
          
 
          -             z-index: 0;
          
 
          -             position: absolute;
          
 
          -             top: 500px;
          
 
          -             left: 380px;
          
 
          -             width: 200px;
          
 
          -             height: 20px;
          
 
          -             float: left;
          
 
          -             border-width: 1px 1px 1px 0px;
          
 
          -             border-style: solid;
          
 
          -             border-color: #333333;
          
 
          -             background: white;
          
 
          -         }
          
 
          -         #show_block {
          
 
          -             z-index: 10;
          
 
          -             position: absolute;
          
 
          -             top: 199px;
          
 
          -             left: 300px;
          
 
          -             width: 150px;
          
 
          -             height: 300px;
          
 
          -             border: red 1px solid;
          
 
          -             display: none;
          
 
          -         }
          
 
          -         #show_block #block_title {
          
 
          -             border-bottom: red 1px solid;
          
 
          -             width: auto;
          
 
          -             height: 20px;
          
 
          -         }
          
 
          -         a {
          
 
          -             color: red;
          
 
          -             cursor: pointer;
          
 
          -         }
          
 
          -     </style>
          
 
          -     <script type="text/javascript">
          
 
          -         var flag = false;
          
 
          -         $(document).ready(function() {
          
 
          -             $("#close").click(function() {
          
 
          -                 $("#show_block").hide();
          
 
          -                 flag = false;
          
 
          -                 $("#bar_left").css("border-width", "1px 1px 1px 1px");
          
 
          -                 $("#bar_left").css("border-color", "#333333");
          
 
          -             });
          
 
          -             $("#bar_left").click(function() {
          
 
          -                 $("#show_block").toggle();
          
 
          -                 if (flag) {
          
 
          -                     flag = false;
          
 
          -                     $("#bar_left").css("border-width", "1px 1px 1px 1px");
          
 
          -                     $("#bar_left").css("border-color", "#333333");
          
 
          -                 } else {
          
 
          -                     flag = true;
          
 
          -                     $("#bar_left").css("border-width", "1px 1px 1px 1px");
          
 
          -                     $("#bar_left").css("border-top-color", "white");
          
 
          -                     $("#bar_left").css("border-left-color", "red");
          
 
          -                     $("#bar_left").css("border-bottom-color", "red");
          
 
          -                     $("#bar_left").css("border-right-color", "red");
          
 
          -                 }
          
 
          -             });
          
 
          -         });
          
 
          -     </script>
          
 
          - </head>
          
 
          - <body>
          
 
          - <div id="show_block">
          
 
          -     <div id="block_title">我是标题         <a id="close" href="#">X</a></div>
          
 
          -     <div id="block_content">我是内容</div>
          
 
          - </div>
          
 
          - <div id="bar_left" style=>
          
 
          -     <center>点击这里</center>
          
 
          - </div>
          
 
          - <div id="bar_right">
          
 
          -     <center>其他内容</center>
          
 
          - </div>
          
 
          - </body>
          
 
          - </html>
          
 
         
       
     | 
  
  [ 此帖被kooness在2009-10-04 16:45重新编辑 ]