怎么给小程序添加背景图片且在背景图片上添加遮罩?

page::before{

content: '';

position: fixed;

top: 0;

z-index: -1;

width: 100vw;

height: 100vh;

background: url("") no-repeat center/cover;

}

page::after{

content: '';

position: fixed;

top: 0;

z-index: -1;

width: 100vw;

height: 100vh;

background:rgba(0,0,0,.5);

}

你可能感兴趣的:(小程序)