📝 代码查看
使用runcode.html页面

1
查看次数
2025-11-06
创建时间
2025-11-06
最后更新
<div></div>
html, body {
    width: 100%;
    height: 100%;
    display: flex;
}


div {
    margin: auto;
    position: relative;
    width: 300px;
    height: 500px;
    background: url(https://picsum.photos/300/500?random=99) no-repeat;
    background-size: cover;

    &::before {
        position: absolute;
        content: "";
        top: 0;left: 0; right: 0;bottom: 0;
        background: url(https://picsum.photos/300/500?random=100) no-repeat;
        background-size: cover;
        mask: linear-gradient(45deg, #000 50%, transparent 50%);
        z-index: 1;
    }
}
暂无JavaScript代码

👁️ 实时预览