CSS盒子模型

來源:互聯網
上載者:User

標籤:table   body   otto   tom   並且   圖片   屬性   nbsp   透明度   

1.盒子模型

2.內邊距

設定內邊距

屬性 描述
padding 設定所有邊距
padding-left 設定左邊距
padding-right 設定右邊距
padding-bottom 設定上邊距
padding-top 設定底邊距

 

3.CSS邊框

 我們可以建立出效果出色的邊框,並且可以應用於任何元素

邊框樣式:

   border-style:定義了10個不同的非繼承樣式,包括none

邊框的單邊樣式:

  border-top-style:

  border-lef-style:

  border-right-style:

  border-bottom-style:

 邊框的寬度:border-width

 設定單邊框寬度:

  border-top-width:

  border-lef-width:

  border-right-width:

  border-bottom-width:

邊框顏色:border-color

設定單邊框顏色:

  border-top-color:

  border-lef-color:

  border-right-color:

  border-bottom-color:

CSS3邊框:

    border-radius:圓角邊框

 

 boxr-shadow:邊框陰影

 

box-shadow:10px(向右) 10px(向下) 5px(透明度)#FFccFF(顏色)

 

    border-image:邊框圖片

4.CSS外邊距

 外邊距;圍繞在內容邊框的地區就是外邊距,外邊距預設為透明地區 

             外邊距接受任何長度單位 百分數值

 外邊距常用屬性:

屬性 描述
margin 設定所有邊距
margin-bottom 設定底邊距
margin-top 設定左邊距
margin-right 設定右邊距
margin-top 設定上邊距

 

 外邊距合并:

 

CSS盒子模型

聯繫我們

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