css。元素樣式、邊框樣式

來源:互聯網
上載者:User

標籤:

1.外邊距  margin

縮寫形式:

  margin:上邊距  右邊距  下邊距  左邊距

  margin:上下邊距  左右邊距

  margin:上邊距  左右邊距  下邊距

2.內邊距  padding

 

縮寫形式:

  padding:上邊距  右邊距  下邊距  左邊距

  padding:上下邊距  左右邊距

  padding:上邊距  左右邊距  下邊距

3.透明度 opacity:number

number值為0.0-1.0之間的小數

邊框樣式

1.邊框線

  border-top-style  設定上邊框線

  border-bottom-style  設定下邊框線

  border-left-style  設定左邊框線

  border-right-style  設定右邊框線

2.邊框寬度   border-width

  border-top-width  設定上邊框寬度

  border-bottom-width  設定下邊框寬度

  border-left-width  設定左邊框寬度

  border-right-width  設定右邊框寬度

3.邊框顏色  border-color 

  border0-top-color  設定上邊框顏色

  border-bottom-color  設定下邊框顏色

  border-left-color  設定做邊框顏色

  border-right-color  設定右邊框顏色

4.邊框樣式縮寫  border-width||border-style||border-color

div{        width:300px;        height:100px;        border-style:solid;        border-width:1px;        border-color:#FF0000; }     

縮寫後:

div{        width:300px;        height:100px;        border:1px solid #FF0000;}   

5.圓角效果

 

  圓:border-radius:50%

 

  

  

 

  

 

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.