Html 如何在vuejs中去掉页脚下的边距
我正在使用vuejs和buefy制作页脚 我对App.vue的定义如下,但页脚下有一个空白Html 如何在vuejs中去掉页脚下的边距,html,css,vue.js,Html,Css,Vue.js,我正在使用vuejs和buefy制作页脚 我对App.vue的定义如下,但页脚下有一个空白 // App.vue <template> <div id="app"> <main-header /> <router-view/> <main-footer /> </div> </template> ... <style> html, bod
// App.vue
<template>
<div id="app">
<main-header />
<router-view/>
<main-footer />
</div>
</template>
...
<style>
html, body {
height: 100%;
}
body {
padding: 0;
margin: 0;
}
</style>
//App.vue
...
html,正文{
身高:100%;
}
身体{
填充:0;
保证金:0;
}
我不确定这些利润是多少
我怎么做
++++
我写的页脚代码如下
// Main Footer
<template>
<footer class="footer">
<div class="content has-text-centered">
<p>
<strong>Web</strong>
<br>
© 2020 •
</p>
</div>
</footer>
</template>
<script>
export default {
name: "MainFooter",
}
</script>
<style scoped>
footer {
margin: 0;
}
</style>
//主页脚
Web
© 2020 •
导出默认值{
名称:“主页脚”,
}
页脚{
保证金:0;
}
您将
正文
的边距设置为0,而不是页脚
。
要为页脚设置它,可以执行类似的操作
footer {
margin: 0;
}
嘿,你能给我们看一些截图吗,比如你面临的问题,比如页脚是如何放置的。那就是helpful@tbhaxor好的,我添加了图像它很可能不是边距,而是页面高度没有设置为占据视口高度。研究如何使用DevTools检查边距。一些边距可能来自
的用户代理样式。页脚下仍有空格。能否显示
组件代码的样子?您确定页脚是带有边距的,而不是内部div/p标记吗?为了测试这一点,你也可以做html,footer{margin:0}
,我还是一样。我已经附上了我的页脚的图片。