Difference between revisions of "Template:SJTU-BioX-Shanghai/Alpha/Header"
Line 19: | Line 19: | ||
color: #91B798; | color: #91B798; | ||
} | } | ||
+ | |||
/* layout BEGIN */ | /* layout BEGIN */ | ||
Line 24: | Line 25: | ||
width: 100%; | width: 100%; | ||
height: 100%; | height: 100%; | ||
− | padding-left: | + | padding-left: 300px; |
padding-top: 20px; | padding-top: 20px; | ||
} | } | ||
+ | |||
nav { | nav { | ||
position: fixed; | position: fixed; | ||
Line 32: | Line 34: | ||
left: 0px; | left: 0px; | ||
height: 100%; | height: 100%; | ||
− | width: | + | width: 250px; |
/* padding-top: 20px; */ | /* padding-top: 20px; */ | ||
padding-right: 30px; | padding-right: 30px; | ||
overflow: visible; | overflow: visible; | ||
} | } | ||
+ | |||
nav > div:first-child { | nav > div:first-child { | ||
display: block; | display: block; | ||
Line 43: | Line 46: | ||
line-height: 100%; | line-height: 100%; | ||
} | } | ||
+ | |||
nav ul { | nav ul { | ||
margin: 0px; | margin: 0px; | ||
Line 48: | Line 52: | ||
list-style: none; | list-style: none; | ||
width: 100%; | width: 100%; | ||
+ | } | ||
+ | nav > ul ul { | ||
+ | position: absolute; | ||
+ | top: 0px; | ||
+ | left: 280px; | ||
+ | height: 0px; | ||
+ | width: 0px | ||
+ | overflow: hidden; | ||
+ | } | ||
+ | nav > ul > li:hover ul, nav > ul > li ul:hover { | ||
+ | } | ||
+ | height: initial; | ||
+ | width: initial; | ||
} | } | ||
nav li { | nav li { | ||
margin-bottom: 1px; | margin-bottom: 1px; | ||
− | |||
− | |||
− | |||
} | } | ||
nav li:last-child { | nav li:last-child { | ||
margin-bottom: 0px; | margin-bottom: 0px; | ||
+ | } | ||
+ | nav > ul > li { | ||
+ | position: relative; | ||
} | } | ||
nav a { | nav a { | ||
− | |||
display: block; | display: block; | ||
+ | padding-left: 40px; | ||
height: 40px; | height: 40px; | ||
− | + | line-height: 100%; | |
− | + | } | |
− | + | nav > ul ul a { | |
+ | padding-left: 20px; | ||
+ | width: 230px; | ||
} | } | ||
/* layout END */ | /* layout END */ | ||
Line 84: | Line 103: | ||
} | } | ||
nav > ul { | nav > ul { | ||
− | |||
} | } | ||
nav > ul ul { | nav > ul ul { | ||
Line 91: | Line 109: | ||
background-color: #EEE; | background-color: #EEE; | ||
} | } | ||
− | + | nav a { | |
− | + | font-family: "Tahoma, Geneva, sans-serif"; | |
− | + | text-transform: uppercase; | |
− | + | } | |
nav > ul > li:first-child > a { | nav > ul > li:first-child > a { | ||
background-color: green; | background-color: green; | ||
} | } | ||
− | + | /* color & font END */ | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
+ | |||
+ | /* animation BEGIN */ | ||
+ | nav > ul ul { | ||
transition: opacity 0.4s, height 0.2s, width 0.1s; | transition: opacity 0.4s, height 0.2s, width 0.1s; | ||
transition-delay: 0.5s; | transition-delay: 0.5s; | ||
opacity: 0; | opacity: 0; | ||
− | |||
− | |||
− | |||
} | } | ||
nav > ul > li:hover > ul, nav > ul > li > ul:hover { | nav > ul > li:hover > ul, nav > ul > li > ul:hover { | ||
transition-delay: 0s; | transition-delay: 0s; | ||
opacity: 0.99; | opacity: 0.99; | ||
− | |||
− | |||
} | } | ||
+ | /* animation END */ | ||
</style> | </style> |
Revision as of 04:18, 10 August 2015