【发布时间】:2022-01-16 10:59:47
【问题描述】:
我有很少的 VueJS + NuxtJS,它有背景 gif。现在看起来像这样:
body {
margin: 0 auto;
background: url("assets/video/background-darked.gif") no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
@media only screen and (max-width: 860px) {
overflow-y: scroll;
}
}
你可以把它放在整个身体上,但我真的不需要它,这个背景 gif 应该只有几页,所以,如果将 body 更改为类名(比如说 main)并像这样使用这个类:
<template>
<div class='main'>
<Header />
</div>
</template>
我会有奇怪的填充物:
我该如何解决这个问题?
【问题讨论】:
-
我们可能需要minimal reproducible example 或 github 存储库来有效地帮助您。最后,通过检查实际的 gif/body,它可能可以使用您的浏览器开发工具修复。
标签: javascript html css vue.js nuxt.js