The web background is covered with the screen property: background-image

//html
<template>
    <div class="backgroud_img">
        
    </div>
</template>
//css
<style lang="scss">

.backgroud_img{
    position: absolute;
    background-image: url(../assets/img/R-C.jpg);//图片路径,需要修改路径名称
    background-size: cover;//背景图铺满
    width: 100%;
    height: 100%;
    top: 0;    
    left: 0;
}

</style>

Record: Learning the background in the web is full and fixed position

Guess you like

Origin blog.csdn.net/weixin_57997644/article/details/130256548