圖片邊框?qū)傩?/h2>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>圖片邊框</title>

    <style>
    html,body,div{
        margin: 0;
        padding: 0;
    }

    #box{
        width: 300px;
        height: 300px;
        background-color: pink;
        /*border: 30px solid orange;*/
        margin: 100px auto;

        /*!*設(shè)置圖片邊框的圖片路徑*!*/
        /*border-image-source: url("img/border.png");*/

        /*!*設(shè)置圖片邊框的寬度 可以為1到4個(gè)值 和margin 相同*!*/
        /*border-image-width: 20px 20px 20px 20px;*/

        /*!*第一不拉伸區(qū)域的大小 點(diǎn)九圖 九宮格 可以為1到4個(gè)值 和margin 相同*!*/
        /*border-image-slice: 26 26 26 26;*/

        /*!*設(shè)置邊框圖片的重復(fù)樣式  stretch 拉伸(默認(rèn)的) repeat居中重復(fù)*!*/
        /*!*round 擠一擠總會(huì)能方下的*!*/
        /*border-image-repeat: round;*/

        /*!*圖片邊框向外偏移的量 可以為1到4個(gè)值 和margin 相同*!*/
        /*border-image-outset: 30px 30px 30px 30px;*/

        /*復(fù)合屬性 第一個(gè)值為 source 第二個(gè)值 是slice 可以為1到4個(gè)值
        第三個(gè)值 是 width 可以為1到4個(gè)值 第四個(gè)參數(shù)為 outset 可以為1到4個(gè)值 第五個(gè)參數(shù)為 repeat 二三四 重間必須加 "/" */
        border-image: url("img/border.png") 26 26 26 26 / 20px 20px 20px 20px / 30px round;

    }

</style>

</head>
<body>

<div id="box">



</div>

</body>
</html>

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容