前提・実現したいこと
現在Vueを使用したSPAを作成しています。複数のコンポーネントに分けてそれを表示する方法で実装しているのですが、一つのページにメインコンテンツ、モーダル、フッターメニューが存在します。そこで下記のような問題が発生しました。コンテンツを一番下のレイヤーに表示したいです。
発生している問題・エラーメッセージ
真ん中のコンテンツ部分が一番上(重なり順)になってしまい、モーダルやフッターメニューに重なって見えてしまう。
該当のソースコード
Vue.js
1<template> 2 <div id="container" class="z-top"> 3 <div id="content"> 4 <v-layout row> 5 <v-flex xs12 sm6 offset-sm3> 6 <v-card > 7 <v-toolbar color="orange" dark> 8 <v-toolbar-title>友だち</v-toolbar-title> 9 <v-spacer></v-spacer> 10 <v-btn icon> 11 <v-icon>add</v-icon> 12 </v-btn> 13 </v-toolbar> 14 <v-list two-line> 15 <v-subheader>プロフィール</v-subheader> 16 <v-list-tile avatar @click="dialog=true"> 17 <v-list-tile-avatar> 18 <img :src="me.avatar" > 19 </v-list-tile-avatar> 20 <v-list-tile-content> 21 <v-list-tile-title v-html="me.title"></v-list-tile-title> 22 <v-list-tile-sub-title v-html="me.subtitle"></v-list-tile-sub-title> 23 </v-list-tile-content> 24 </v-list-tile> 25 26 <template v-for="(item, index) in items.slice(0, 100)"> 27 <v-subheader v-if="item.header" :key="item.header">{{ item.header }}</v-subheader> 28 <v-divider v-else-if="item.divider" :inset="item.inset" :key="index"></v-divider> 29 <v-list-tile v-else :key="item.title" avatar @click="logout"> 30 <v-list-tile-avatar> 31 <img :src="item.avatar" > 32 </v-list-tile-avatar> 33 <v-list-tile-content> 34 <v-list-tile-title v-html="item.title"></v-list-tile-title> 35 <v-list-tile-sub-title v-html="item.subtitle"></v-list-tile-sub-title> 36 </v-list-tile-content> 37 </v-list-tile> 38 </template> 39 </v-list> 40 </v-card> 41 </v-flex> 42 </v-layout> 43 </div> 44 <div class="z-top"> 45 <dialogs/> 46 </div> 47 <div class="z-top"> 48 <tabber id="tab"/> 49 </div> 50 </div> 51</template> 52<script> 53import { auth } from '../firebase' 54import Tabber from './Tabber' 55import Dialogs from './Dialogs' 56export default { 57 components: { 58 Tabber, 59 Dialogs 60 }, 61 data () { 62 return { 63 e1: 'frnd', 64 me:{ avatar: 'https://vuetifyjs.com/static/doc-images/lists/1.jpg', title: 'Brunch this weekend?', subtitle: "<span class='text--primary'>Ali Connors</span> — I'll be in your neighborhood doing errands this weekend. Do you want to hang out?" }, 65 items: [ 66 { header: 'Today' }, 67 { avatar: 'https://vuetifyjs.com/static/doc-images/lists/1.jpg', title: 'Brunch this weekend?', subtitle: "<span class='text--primary'>Ali Connors</span> — I'll be in your neighborhood doing errands this weekend. Do you want to hang out?" }, 68 { divider: true, inset: true }, 69 { avatar: 'https://vuetifyjs.com/static/doc-images/lists/2.jpg', title: 'Summer BBQ <span class="grey--text text--lighten-1">4</span>', subtitle: "<span class='text--primary'>to Alex, Scott, Jennifer</span> — Wish I could come, but I'm out of town this weekend." }, 70 { divider: true, inset: true }, 71 { avatar: 'https://vuetifyjs.com/static/doc-images/lists/3.jpg', title: 'Oui oui', subtitle: "<span class='text--primary'>Sandra Adams</span> — Do you have Paris recommendations? Have you ever been?" }, 72 { divider: true, inset: true }, 73 { avatar: 'https://vuetifyjs.com/static/doc-images/lists/4.jpg', title: 'Birthday gift', subtitle: "<span class='text--primary'>Trevor Hansen</span> — Have any ideas about what we should get Heidi for her birthday?" },] 74 } 75 }, 76 methods:{ 77 logout(){ 78 auth.signOut().then(function() { 79 console.log("Signed out.") 80 81 }); 82 this.$router.push({path:'/Title'}) 83 } 84 } 85} 86</script> 87<style scoped> 88.z-top{ 89 position: relative; 90 z-index: 100; 91} 92.z-bot{ 93 position: relative; 94 z-index: 0; 95} 96#container{ 97 width: 100%; 98 position: relative; 99 height: auto !important; 100 height: 100%; 101 min-height: 100%; 102} 103#content{ 104 position: relative; 105 padding-bottom: 56px; 106} 107#tab{ 108 position: fixed; 109 bottom: 0; 110 right:0; 111 left: 0; 112} 113</style>
試したこと
contentにz-index-1を付けるなどをしましたがz-indexの仕様がよくわからずに結局解決できていません。
補足情報(FW/ツールのバージョンなど
"firebase": "^5.1.0", "vue": "^2.5.2", "vue-router": "^3.0.1", "vuefire": "^1.4.5", "vuetify": "^1.0.19", "vuex": "^3.0.1"
よろしくお願いします。

回答2件
あなたの回答
tips
プレビュー