【发布时间】:2021-10-12 10:09:17
【问题描述】:
我需要在 Vue js 项目主页添加页脚。但它不起作用,我对 vue 不太了解,我是初学者。
I need to add footer to this page
这是我的页脚组件:
<template>
<footer>
</footer>
</template>
<style scoped>
footer
{
display: flex;
background-color: #42b942;
height: 50px;
width: 100%;
position: fixed;}
</style>
这是我在 App.vue 中的代码:
<template>
<div id="app">
<div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</div>
<router-view/>
</div>
</template>
<script>
import footer from '@/components/footer.vue';
export default {
name: "footer",
components: {
footer
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
#nav {
padding: 30px;
}
#nav a {
font-weight: bold;
color: #2c3e50;
}
#nav a.router-link-exact-active {
color: #42b983;
}
</style>
vue项目打开页面获取footer有哪些变化。
【问题讨论】:
标签: javascript vue.js footer