📝 代码查看
使用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: 25vw;
    height: 50vh;
    background: url(https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1877625006,2341162086&fm=26&gp=0.jpg) no-repeat;
    background-size: cover;

    &::before {
        position: absolute;
        content: "";
        top: 0;left: 0; right: 0;bottom: 0;
        background: url(https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2128480768,3645204276&fm=26&gp=0.jpg) no-repeat;
        background-size: cover;
        mask: linear-gradient(45deg, #000 40%, transparent 60%);
        z-index: 1;
    }
}
暂无JavaScript代码

👁️ 实时预览