Difference between revisions of "Template:SJTU-BioX-Shanghai/Navigator1"

(Created page with "<html> <aside id="nav"> <embed src="/wiki/images/d/de/SJTUB_shade.svg" /> <div id="nav-trigger" onclick="toggle_nav()"> <svg width="6px" height="24px"><polygon points="6,0 0,1...")
 
 
(15 intermediate revisions by the same user not shown)
Line 56: Line 56:
  
 
<style>
 
<style>
 +
#nav {
 +
  position: fixed;
 +
  top: 0px;
 +
  left: 0px;
 +
 
 +
  box-sizing: border-box;
 +
  width: 10.5em;
 +
  height: 100%;
 +
  padding-top: 20px;
 +
 
 +
  box-shadow: 2px 0 1px grey;
 +
 
 +
  background-color: white;
 +
 +
  transition: left 0.2s;
 +
}
 +
 +
#nav nav {
 +
  margin-left: 1em;
 +
  z-index: 1;
 +
}
 +
 +
#nav #nav-trigger {
 +
  z-index: 2;
 +
  position: fixed;
 +
  top: 0px;
 +
  left: 0px;
 +
  height: 100%;
 +
  width: 0.5em;
 +
 +
  transition: width 0.2s;
 +
 
 +
  background-color: #55A463;
 +
}
 +
 +
#nav #nav-trigger svg {
 +
  position: absolute;
 +
  top: 50%;
 +
  fill: white;
 +
}
 +
 +
#nav nav ul {
 +
  margin: 0px;
 +
  padding: 0px;
 +
  list-style: none;
 +
  font-size: 0.8em;
 +
}
 +
#nav nav li {
 +
  position: relative;
 +
}
 +
 +
#nav ul ul {
 +
  position: absolute;
 +
  left: 100%;
 +
  top: 0px;
 +
  width: 0em;
 +
 +
  margin: 0px;
 +
 +
  transition: opacity 0.3s ease-out 0.2s, width 0s linear 0.5s;
 +
  opacity: 0;
 +
  overflow: hidden;
 +
 +
  background-color: white;
 +
  box-shadow: 2px 0 1px grey;
 +
}
 +
#nav nav li:hover ul, #nav nav li ul:hover {
 +
  transition: opacity 0.3s ease-out 0s, width 0s linear 0s;
 +
  opacity: 1;
 +
  width: 15em;
 +
}
 +
 +
#nav nav a {
 +
  color: #8AA28E;
 +
  font-weight: 500;
 +
  text-transform: uppercase;
 +
  text-decoration: none;
 +
  display: block;
 +
  box-sizing: border-box;
 +
  height: 2em;
 +
}
 +
#nav nav > ul > li > a {
 +
  padding-left: 1.2em;
 +
}
 +
#nav nav > ul > li > a:not(:last-child)::before {
 +
    content: "+";
 +
    position: absolute;
 +
    left: 0em;
 +
}
 +
 +
#content.nav-toggle #nav #nav-trigger {
 +
  width: 0.9em;
 +
}
 +
#content.nav-toggle #nav #nav-trigger svg {
 +
  transform: matrix(-1,0,0,1,3,0)
 +
}
 +
#content.nav-toggle #nav {
 +
  left: -11em;
 +
}
 
</style>
 
</style>
  
 
</aside>
 
</aside>
 
</html>
 
</html>

Latest revision as of 07:21, 17 September 2015