首頁  >  文章  >  web前端  >  詳解css樣式之border-image屬性

詳解css樣式之border-image屬性

高洛峰
高洛峰原創
2017-03-15 10:35:351242瀏覽

這篇文章詳解css樣式之border-image屬性

#border-image-source 屬性設定邊框的圖片的路徑[none | dc0870658837139040642baa5555a380]

 p {
   border: 20px solid #000;
   border-image-source: url(border.png);
}

border-image-slice 屬性圖片邊框向內偏移[ d80b5def5ed1be6e26d91c2709f14170 | 42c97a047d75abc12b9b351eb8562711 ](1,4) ?fill

 p {
   border: 20px solid #000;
   border-image-source: url(border.png);
   border-image-slice: 27,27,27,27;
}

border-image-width 屬性設定圖片邊框的寬度[ d82af2074b26fcfe177e947839b5d381|d80b5def5ed1be6e26d91c2709f14170 |42c97a047d75abc12b9b351eb8562711 | auto](1,4)

 p {
   border: 20px solid #000;
   border-image-source: url(border.png);
   border-image-slice: 27,27,27,27;
   border-image-width: 27px 1 10% 27px;
}

border-image-outset 屬性設定邊框圖像區域超出邊框的量[ d82af2074b26fcfe177e947839b5d381|d80b5def5ed1be6e26d91c2709f14170 ](1,4)

 p {
   border: 20px solid #000;
   border-image-source: url(border.png);
   border-image-slice: 27,27,27,27;
   border-image-width: 27px 1 10% 27px;
   border-image-outset: 27px 27px 27px 27px;
}

border-image-repeat 屬性設定影像邊框是否要平鋪(repeated)、鋪滿(rounded)或拉伸(stretched)(1,2)

 p {
   border: 20px solid #000;
   border-image-source: url(border.png);
   border-image-slice: 27,27,27,27;
   border-image-width: 27px 1 10% 27px;
   border-image-outset: 27px 27px 27px 27px;
   border-image-repeat: rounded;
   border-image: url(border.png) 27  rounded;
}

以上是詳解css樣式之border-image屬性的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn