1.border-image

來源:互聯網
上載者:User

標籤:

1.設定在元素圍繞的border的圖片,用圖片代替邊框

文法:broder-image-source:圖片border-image-slice:切下的地區,數字|百分比(相對於映像的高度和寬度)border-image-width:在round情況下設定repeat圖片的寬度border-image-repeat:stretch|round|repeat|spaceborder-image-outset:
border-image有三個要求

  1.使用在border上,元素上必須有border屬性
  2.切片像素slice
  3.定義中間的地區是重複展開還是直接展開

簡寫:border-image:url("source") 30 round;簡寫只能寫圖片地址,slice地區,和repeat方式,border-image-width須單獨寫,否則無法顯示JavaScript syntax:   object.style.borderImageSlice="30%"

瀏覽器支援

 

原圖片

1.stretch展開,slice是30,根據單個小方塊來計算

 

2.round重複小方塊平鋪,slice是30,根據單個小方塊來計算

 

3.repeat重複平鋪,slice是30,根據單個小方塊來計算

 

4.slice值是百分比,相對於映像的高度和寬度

5.border-image-width:在round情況下設定repeat圖片的寬度

 

 

1.border-image

聯繫我們

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