반응형
https://www.w3schools.com/howto/howto_css_icon_bar.asp
https://bootstrap-vue.js.org/docs/components/alert
<template>
<div class="icon-bar">
<router-link to="/">Home</router-link>
<router-link to="/"><v-icon name="home" scale="3"></v-icon></router-link>
<router-link to="/about"><v-icon name="search" scale="3"></v-icon></router-link>
<a href="#"><v-icon name="envelope" scale="3"></v-icon></a>
<a href="#"><v-icon name="globe" scale="3"></v-icon></a>
<a href="#"><v-icon name="trash" scale="3"></v-icon></a>
</div>
</template>
<script>
export default {
name: 'SideBar'
}
</script>
<style>
.sidenav {
height: 100%; /* Full-height: remove this if you want "auto" height */
width: 160px; /* Set the width of the sidebar */
position: fixed; /* Fixed Sidebar (stay in place on scroll) */
z-index: 1; /* Stay on top */
top: 0; /* Stay at the top */
left: 0;
background-color: #111; /* Black */
overflow-x: hidden; /* Disable horizontal scroll */
padding-top: 20px;
}
/* The navigation menu links */
.sidenav a {
padding: 6px 8px 6px 16px;
text-decoration: none;
font-size: 25px;
color: #818181;
display: block;
}
/* When you mouse over the navigation links, change their color */
.sidenav a:hover {
color: #f1f1f1;
}
@media screen and (max-height: 450px) {
.sidenav {padding-top: 15px;}
.sidenav a {font-size: 18px;}
}
.icon-bar {
height: 100%;
width: 90px;
background-color: #555;
position: fixed; /* Fixed Sidebar (stay in place on scroll) */
/*z-index: 1;*/ /* Stay on top */
/*top: 0;*/ /* Stay at the top */
left: 0;
overflow-x: hidden; /* Disable horizontal scroll */
padding-top: 0;
}
.icon-bar a {
display: block;
text-align: center;
padding: 16px;
transition: all 0.3s ease;
color: white;
font-size: 36px;
}
.icon-bar a:hover {
background-color: #858585;
}
.active {
background-color: #5eaf13;
}
</style>
반응형
'엉터리 개발 이야기 > vue' 카테고리의 다른 글
[Vue] mounted 에서 data undefined 발생할 경우 (0) | 2018.12.20 |
---|---|
[Vue] SideBar 예제 (0) | 2018.12.18 |
[Vue][Vuex] store 관리 방법 참고 소스 (0) | 2018.12.13 |
[Vue] 간단한 Side Icon Bar 적용해보기 (0) | 2018.12.13 |
[Vue] vue-cli 사용, vue ui 사용 (0) | 2018.12.13 |