css 控制div高度自適應瀏覽器的高度

來源:互聯網
上載者:User

css 控制div高度自適應瀏覽器的高度

 1 <html> 2 <head> 3 <style> 4 #myTable{height:100%;border:solid 1px red;width:100%;} 5 #top{margin-top:1px;height:100px;border:solid 1px green} 6 #down{margin-top:1px;height:89%;border:solid 1px silver} 7 #left{height:100%;border:solid 1px black;margin:1px;width:200px;float:left;} 8 #right{border:solid 1px #0aa;margin:1px;height:100%;width:240px;overflow:scroll; 9 }10 </style>11 </head>12 <body>13 <table id='myTable'>14 <tr><td>15 <div id='top'></div>16 <div id='down'>17 <div id='left'></div>18 <div id='right'>19 這裡是內容20 這裡是內容容這裡是內容21 這裡是內容22 這裡是內容23 這裡是內容24 這裡是內容25 這裡是內容這裡是內容26 這裡這裡是內容27 28 這裡是內容29 這裡是內容30 這裡是內容31 32 這裡是內容33 這裡是內容34 這裡是內容35 這裡是內容這裡是內容36 這裡這裡是內容37 38 這裡是內容39 這裡是內容40 這裡是內容41 42 這裡是內容43 這裡是內容這裡是內容44 45 這裡是內容46 47 這裡是內容48 這裡是內容這裡是內容49 這裡這裡是內容50 51 這裡是內容52 這裡是內容53 這裡是內容54 這裡是內容55 這裡是內容容這裡是內容56 這裡是內容57 這裡是內容這裡是內容58 這裡這裡是內容59 60 這裡是內容61 這裡是內容62 這裡是內容63 這裡是內容64 這裡是內容容這裡是內容65 </div>66 </div>67 </td>68 </tr></table>69 </body>70 </html>

 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.