第三篇部落格

來源:互聯網
上載者:User

標籤:image   font   png   測試   why   type   pos   img   styles   

 1 <!DOCTYPE html><html> 2 <head> 3     <meta charset="utf-8"> 4     <meta name="author" content="http://www.softwhy.com/" /> 5     <title>測試absolute與fixed</title> 6     <style type="text/css"></style> 7     <link rel="stylesheet"href="position.css"> 8 </head> 9 <body style="height:1000px;">10 <div id="left">absolute</div>11 <div id="right">fixed</div>12 </body>13 <h1>fixed相對移動的座標是視圖(螢幕內的網頁視窗)本身,而absolute相對body座標原點進行定位</h1>14 </html>
 1 div{ 2   width:100px; 3   height:100px; 4   background:yellow; 5 } 6 #left{ 7   left:0px; 8   top:100px; 9   font-size:28px;10   position:absolute;11 }12 #right{13   right:0px;14   top:100px;15   font-size:28px;16   position:fixed;17 }18 h1{19     left:0px;20     top:100px;21     font-size:18px;22 }

第三篇部落格

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.