【发布时间】:2018-09-27 18:35:28
【问题描述】:
我目前关注 vuetify SPA 示例,v-parallax 尚未完全准备好用于 vue-cli v3。 当前结构在顶部显示 v-toolbar,v-navigation-drawerr,然后 v-content 显示不同的视图...
App.vue
<template>
<v-app light>
<div id="app">
<v-navigation-drawer absolute class="hidden-sm-and-up" v-model="sideNav">
<v-toolbar flat>
....
</v-toolbar>
<v-list>
....
</v-list>
</v-navigation-drawer>
<v-toolbar>
....
</v-toolbar>
<v-content>
<router-view/>
</v-content>
</div>
</v-app>
</template>
Section1.vue
<div class="section1">
<section>
<div class="parallax">
<v-layout
column
align-center
justify-center
class="white--text"
>
<img src="../assets/images/vuetify.png" alt="Vuetify.js" height="200">
</v-layout>
</div>
</section>
</div>
</template>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.parallax {
background-image: url('../assets/images/hero.jpeg');
background-size:cover;
/* Set a specific height */
min-height: 600px;
/* Create the parallax scrolling effect */
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
</style>
我想在视差背景图像上显示 v-toolbar,这意味着它应该是透明的,并且背景图像应该显示在 v-toolbar 下方的顶部
目前是否可以使用 CSS 或者我是否应该不使用 vuetify 并回到简单的 html/css 模板编码?
感谢您的反馈和建议
【问题讨论】:
标签: css vue.js vuetify.js