美文网首页
边框相关

边框相关

作者: 562843cce5ff | 来源:发表于2019-05-04 11:04 被阅读0次

边框背景

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            width: 300px;
            height: 300px;
            margin: 100px auto;
            box-sizing: border-box;
            border: 70px solid #000;
            border-image-source: url("../a/ad6.jpg");
            border-image-slice: 100 100 100 100;
            /*沿每个顶点的的距离切割,如果要显示中间的在最后加上fill*/
            border-image-width: 70px;
            /*设置边框图片的距离,但是设置次属性边框宽度将失效*/
            border-image-repeat: stretch;
            /*设置边框图片的展示方式,默认是stretch拉伸,还有round铺满,repeat平铺*/
            border-image-outset: 10px 10px 10px 10px;
            /*设置边框图片超出边框的量*/

            border-image:url("../a/ad6.jpg") 70 stretch;
            /*连写*/
        }
    </style>
</head>
<body>
<div></div>

</body>
</html>

相关文章

网友评论

      本文标题:边框相关

      本文链接:https://www.haomeiwen.com/subject/tpcxoqtx.html