問題:關於一個壇友的html布局實現,壇友html布局實現
來源:http://www.ido321.com/888.html
壇友的需求
這個跟上次貼友分類菜單的實作類別似
html:
1: <body>
2: <div class="test">
3: <div>
4: <img src="my.jpg" alt="test">
5: <h3>圖片標題</h3>
6: <span><a href="#">編輯</a> <a href="#">刪除</a></span>
7: </div>
8: <div>
9: <img src="my.jpg" alt="test">
10: <h3>圖片標題</h3>
11: <span><a href="#">編輯</a> <a href="#">刪除</a></span>
12: </div>
13: <div>
14: <img src="my.jpg" alt="test">
15: <h3>圖片標題</h3>
16: <span><a href="#">編輯</a> <a href="#">刪除</a></span>
17: </div>
18: </div>
19: </body>
css:
1: *
2: {
3: margin: 0 auto;
4: }
5: .test
6: {
7: width: 400px;
8: height: 500px;
9: border: 1px solid black;
10: }
11: .test div
12: {
13: border-bottom: 2px solid #ccc;
14: height: 150px;
15: width: 350px;
16: margin-top: 10px;
17: margin-bottom: 5px;
18: position: relative;
19: }
20: h3
21: {
22: position: absolute;
23: left: 155px;
24: top: 55px;
25: }
26: span
27: {
28: position: absolute;
29: top: 58px;
30: left: 250px;
31: font-weight: bold;
32: }
33: a{
34: color: #000;
35: text-decoration: none;
36: }
37: a:hover
38: {
39: color: #000;
40: text-decoration: none;
41: }
效果:
100分!!寫一個HTML DIV布局!
又是你...原先發的那個我已經回答了,再貼一次好了
<div id="wrapper">
<div id="header"></div>
<div id="left" style="float:left;width:70%"></div>
<div id="right" style="float:right;width:29%">
<div id="right_top"></div>
<div id="right_center"></div>
<div id="right_bottom"></div>
</div>
<div id="footer" style="clear:both"></div>
</div>
body什麼的標籤我就省略了,主體就是以上的。
一個html + css的網頁布局代碼
<div class="biankuang" style="width:1024px; height:768px">
<div class="dingbu" style="width:100%; height:30px;">頂部</div>
<div class="zuobu" style="width:200px; height:100%; float:left;">左部</div>
<div class="youbu" style="width:100%; height:100%; float:left;">右部</div>
</div>