vue中不能占满整个屏幕

1. css中设置div的样式position:fixed;及height:100%,width:100%

<template>
  <div class="html body">
</template>

.html{
  background:url('../img/bg.jpg') repeat center top #826e79;
  height: 100%;
  width: 100%;
  position: fixed;
}

2.App.vue中设置body

body {
    margin: 0;
    padding: 0;
  }
发布了27 篇原创文章 · 获赞 0 · 访问量 591

猜你喜欢

转载自blog.csdn.net/qq_40209717/article/details/103394636