css樣式中的border-image使用詳解

來源:互聯網
上載者:User
這次給大家帶來css樣式中的border-image使用詳解,使用css樣式中border-image的注意事項有哪些,下面就是實戰案例,一起來看一下。

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

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

border-image-slice 屬性圖片邊框向內位移[ <number> | <percentage> ](1,4) ?fill

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

border-image-width 屬性設定圖片邊框的寬度[ <length>|<number> |<percentage> | 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 屬性設定邊框映像地區超出邊框的量[ <length>|<number> ](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;}

相信看了本文案例你已經掌握了方法,更多精彩請關注php中文網其它相關文章!

推薦閱讀:

百度貼吧的3D翻牌效果

css3實現動畫單車效果

CSS3實現進度條的倆種方法

相關文章

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.