問題:關於一個壇友的html布局實現,壇友html布局實現

來源:互聯網
上載者:User

問題:關於一個壇友的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>
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.