@import url(http://fonts.lug.ustc.edu.cn/css?family=Noto+Sans); *, *:before, *:after { box-sizing: border-box; } html, body { height: 100%; width: 100%; } $button-color: #65d3e3; $top-grad: #2c3e50 ; $bottom-grad: #51606f; body{ background: #fff; font-family: 'Noto Sans', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } // Cover content with overlay when navigation is triggered. It would be nice to close the navigation if the overlay is clicked, but I am not sure how to code that. #cover{ opacity: 0; visibility: hidden; width: 100%; height: 100%; position: fixed; z-index: 1; transition: opacity 0.2s ease-in-out; &.display{ background: rgba(0,0,0,0.2); opacity: 1; visibility: visible; } } #main-nav{ background: linear-gradient(to bottom, $top-grad 0%, $bottom-grad 100%); z-index:1; height: 100%; width: 5em; position: fixed; overflow: hidden; transition: background 0.3s ease-in-out, width 0.3s ease; &.show{ background: $button-color; width: 18em; } } #nav-button{ background: $button-color; height: 3em; width: 3em; border-radius: 50%; box-shadow: 0 2px 5px 0 rgba(0,0,0,.25); top: 1em; left: 1em; position: relative; user-select: none; color: #333; transition: all 0.3s ease-in-out; overflow: hidden; .fa{ position: absolute; top: 0; left: 0.2em; right: 0; bottom: 0; margin: auto; display: block; width: 1em; height: 1em; font-size: 1em; opacity: 1; transition: opacity 0.4s ease-in-out; } &:hover{ cursor:pointer; box-shadow: 0 7px 15px 0 rgba(0,0,0,.3); color: #222; } &.width{ width: 80em; height: 80em; top: -37.5em; left: -37.5em; box-shadow: none; //animation: curve 1s linear; //animation-fill-mode: forwards; &:before { content:''; display: block; width: 0.4em; height: 0.4em; border-radius: 50%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; animation: color 0.3s linear; } } } @keyframes color { 0% { box-shadow: 0; } 30% { box-shadow: 0 0 10px 25px rgba(12,121,137,0.5); /* feather / spread */ } } /*@keyframes curve { 0% { transform: rotate(0deg) translate(0px) rotate(0deg); } 100% { transform: rotate(60deg) translate(200px) rotate(-60deg); } }*/ #nav-list{ position: absolute; top: 7em; padding: 0 0 0 2em; opacity: 0; width: 100%; transition: opacity 0.2s ease; //transition-delay: 0s; a{ color: #444; text-decoration: none; font-size: 0.9em; display: block; width :100%; padding: 1.2em 0; transition: color 0.2s ease-in-out; &:hover{ color: #000; } } &.nav-show{ opacity: 1; } } // Extras #content{ padding: 0 0 0 7em; h1{ padding: 1.25em 0; letter-spacing: 0.03em; font-size: 1.4em; } }