HTML第九天學習筆記

來源:互聯網
上載者:User

標籤:今天   分享   color   ack   屬性   div   head   style   邊框   

今天就繼續看了下浮點float屬性,代碼如下:

 1 <html> 2     <head> 3         <title>CSS float屬性</title> 4         <meta http-equiv = "content-type" content = "text/html; charset = utf-8"> 5         <style type = "text/css"> 6             /* 7                 img{ 8                 float:right;                圖片居右 9                 border:1px dotted red;        設定邊框10                 margin:0px 0px 15px 20px;    外填充設定11                 }12             */13             div{14                 float:right;                /*圖片居右*/15                 width:125px;                /*寬125個像素*/16                 margin:0 0 15px 20px;        /*CSS外邊距屬性*/17                 padding:15px;                /*CSS內邊距屬性*/18                 border:1px solid black;        /*給文本添加一個一像素厚的黑色邊框*/19                 text-align:center;            /*文本置中*/20             }21         </style>22     </head>23 24     <body>25         <div>26             <img src="Images/jd1.png" />27             圖片標題28         </div>29         <p>30             This is some text. This is some text. This is some text.31             This is some text. This is some text. This is some text.32             This is some text. This is some text. This is some text.33         </p>34         <p>35             This is some text. This is some text. This is some text.36             This is some text. This is some text. This is some text.37             This is some text. This is some text. This is some text.38             This is some text. This is some text. This is some text.39             This is some text. This is some text. This is some text.40             This is some text. This is some text. This is some text.41             This is some text. This is some text. This is some text.42             This is some text. This is some text. This is some text.43             This is some text. This is some text. This is some text.44             This is some text. This is some text. This is some text.45         </p>46     </body>47 </html>

 

效果

HTML第九天學習筆記

聯繫我們

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