[css/vue] A solution to the body operation style in the Vue component

Since there are always white spaces around the vue component, and there is no modification of the body style in vue like in html, it needs to be solved by an outermost div.

<template>


    <div class="bg">
    </div>
</template>


<style>
.bg{
     position: absolute;
     top: 0;
     left: 0;
     width: 100%; 
     height: 100%;
     overflow-y: auto;
     background-color: red;
}
</style>

Guess you like

Origin blog.csdn.net/dxnn520/article/details/128514029