殘破HTML+CSS設置裝備擺設div大小的實例代碼如下:
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>CSS5 設置裝備擺設DIV大小的實例</title>
- <style>
- .expa{ width:120px; height:80px; border:1px solid #F00}
- .expb{ width:200px; height:120px; border:1px solid #00F}
- </style>
- </head>
- <body>
- <div class="expa">設置裝備擺設寬度120px 高度80px,視察此DIV大小</div>
- <div class="expb">配置寬度200px 高度120px,考查此DIV大小</div>
- </body>
- </html>
這里配置兩個class劃分在兩個引入內部CSS,兩個DIV盒子配置CSS寬度與高度差距,如許完成DIV大小設置裝備擺設。
如需轉載,請注明文章出處和來源網址:http://www.rs2pl.com/wenji/w53771.shtml