Skip to content

Instantly share code, notes, and snippets.

@math2001
Last active February 18, 2017 04:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save math2001/955d34a905f958a1b6962e583c46b130 to your computer and use it in GitHub Desktop.
Save math2001/955d34a905f958a1b6962e583c46b130 to your computer and use it in GitHub Desktop.
* {
box-sizing: border-box;
}
section {
overflow: auto;
position: relative;
}
section table {
display: table;
}
header + section {
background-color: #fffe;
background: #DAE1E3;
bottom: 0;
box-shadow: 0 0 20px #AAA;
height: 100%;
left: 0;
margin-left: 0 !important;
overflow: hidden;
padding: 5px;
position: fixed;
top: 0;
width: 340px;
padding-left: 30px;
z-index: 500;
animation-name: hideSideBar;
animation-duration: .5s;
animation-fill-mode: forwards;
transition: all .5s;
}
header + section:hover {
overflow: auto;
background: #FFF;
box-shadow: 0 0 20px #aaa;
animation-name: showSideBar;
animation-duration: .5s;
transition-timing-function: ease-out;
}
@keyframes showSideBar {
from {
transform: translateX(-280px);
}
80% {
transform: translateX(0px)
}
to {
transform: translateX(-20px);
}
}
@keyframes hideSideBar {
from {
transform: translateX(-20px);
}
20% {
transform: translateX(0px)
}
to {
transform: translateX(-280px);
}
}
@media (max-width:1350px) {
section {
margin-left: 60px !important;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment