[簡介]: 關鍵代碼; <el-row class='midPart' style=''>{{ menu.name }}</el-row>.midPart { float: left; width: 4%; padding: 7px 7px; background: #444;} [內容]: <te ...
[簡介]:
關鍵代碼;
<el-row class='midPart' style=''>{{ menu.name }}</el-row>
.midPart {
float: left;
width: 4%;
padding: 7px 7px;
background: #444;
}
[內容]:
<template>
<div id="MidMenu">
<div ref='midMenu' class='midMenu'>
<router-link v-for='(menu,key) in midMenus' :key='key' :to='menu.link' :title='menu.title' class='midMenus'>
<el-row class='midPart' style=''>{{ menu.name }}</el-row>
</router-link>
</div>
</div>
</template>
<script>
export default {
name: 'MidMenu',
data() {
return {
path: this.$route.path,
midMenus: [
{link: '/', name: '散記', title: '散記'},
{link: '/', name: '編程', title: '編程'},
{link: '/', name: '數學', title: '數學'},
{link: '/', name: '天文', title: '天文'},
{link: '/', name: '物理', title: '物理'},
{link: '/', name: '化學', title: '化學'},
{link: '/', name: '生物', title: '生物'},
{link: '/', name: '文學', title: '文學'},
{link: '/', name: '藝術', title: '藝術'},
],
}
},
created() {
},
methods: {
}
}
</script>
<style>
#MidMenu {
color: white;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.midMenu {
margin-top: -30px;
text-align: center;
}
.midMenus {
padding: 2px;
}
.midPart {
float: left;
width: 4%;
font-size: 15px;
padding: 7px 7px;
color: dodgerblue;
background: #444;
}
.midPart:hover {
color: white;
background: cornflowerblue;
}
</style>
[說明]:偶然間發現 。
[個人博客]:-- 創意時空-散記詳情 (codeworld.fun)
明月幾時有?把酒問青天。不知天上宮闕,今夕是何年。我欲乘風歸去,又恐瓊樓玉宇,高處不勝寒。起舞弄清影,何似在人間。
轉朱閣,低綺戶,照無眠。不應有恨,何事長向別時圓?人有悲歡離合,月有陰晴圓缺,此事古難全。但願人長久,千里共嬋娟。