Difference between revisions of "Template:HSNU-TAIPEI/main"
Line 1: | Line 1: | ||
<html> | <html> | ||
<style> | <style> | ||
− | / | + | /********************** |
GENERAL | GENERAL | ||
− | + | **********************/ | |
* { | * { | ||
− | + | box-sizing: border-box; | |
} | } | ||
− | + | html, | |
− | + | body { | |
+ | margin: 0; | ||
+ | width: 100%; | ||
+ | } | ||
+ | .wrapper { | ||
+ | width: 100%; | ||
+ | margin: 0; | ||
+ | padding: 0; | ||
+ | background: #f7f7f7; | ||
} | } | ||
− | + | ||
− | + | header { | |
− | + | width: 100%; | |
+ | height: 80px; | ||
+ | border-bottom: 1px solid #d0d0d0; | ||
+ | background: #fff; | ||
} | } | ||
− | + | .is-nav-active { | |
− | + | overflow-y: scroll; | |
− | + | position: fixed; | |
} | } | ||
− | + | /********************** | |
− | + | NAVIGATION | |
− | + | **********************/ | |
− | + | ||
− | + | .cell { | |
+ | margin: 0 20px; | ||
} | } | ||
− | . | + | .cell::after { |
− | + | content: ""; | |
+ | clear: both; | ||
+ | display: block; | ||
} | } | ||
− | . | + | .logo { |
− | + | float: left; | |
− | + | width: 25%; | |
} | } | ||
− | . | + | .logo a { |
− | + | display: block; | |
− | + | width: 180px; | |
− | + | margin-top: 10px; | |
− | + | ||
} | } | ||
− | . | + | .logo img { |
− | + | width: 100%; | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} | } | ||
− | . | + | .header-right { |
− | + | float: left; | |
+ | width: 75%; | ||
} | } | ||
− | . | + | .header-right::after { |
− | + | content: ""; | |
− | + | clear: both; | |
+ | display: block; | ||
} | } | ||
− | + | .nav { | |
− | + | margin-top: 18px; | |
− | + | ||
} | } | ||
− | + | .nav-btn { | |
− | + | float: right; | |
− | + | display: block; | |
+ | text-decoration: none; | ||
+ | width: 48px; | ||
+ | } | ||
+ | |||
+ | .nav-btn img { | ||
+ | width: 100%; | ||
+ | } | ||
+ | |||
+ | .main-nav { | ||
+ | display: none; | ||
+ | margin: 0; | ||
+ | padding: 0; | ||
+ | } | ||
+ | |||
+ | |||
+ | .close-btn { | ||
+ | display: none; | ||
+ | position: absolute; | ||
+ | top: 20px; | ||
+ | right: 20px; | ||
+ | width: 32px; | ||
+ | z-index: 100; | ||
+ | } | ||
+ | |||
+ | .list-item { | ||
+ | list-style: none; | ||
+ | margin: 10px; | ||
+ | padding: 0; | ||
+ | } | ||
+ | |||
+ | .list-item a { | ||
+ | text-decoration: none; | ||
+ | font-size: 1.1em; | ||
+ | font-family: "Open Sans", sans-serif; | ||
+ | font-weight: 600; | ||
+ | color: #bbb; | ||
+ | } | ||
+ | |||
+ | .open-nav { | ||
+ | display: block !important; | ||
+ | position: fixed; | ||
+ | width: 100%; | ||
+ | height: 100%; | ||
+ | background: rgba(39, 137, 152, 0.95); | ||
+ | top: 0; | ||
+ | right: 0; | ||
+ | bottom: 0; | ||
+ | left: 0; | ||
+ | } | ||
+ | |||
+ | .open-nav li { | ||
+ | margin: 0; | ||
+ | padding: 0; | ||
+ | } | ||
+ | |||
+ | .open-nav a { | ||
+ | display: block; | ||
+ | width: 100%; | ||
+ | height: 100%; | ||
+ | margin: 0; | ||
+ | padding: 30px; | ||
+ | font-size: 150%; | ||
+ | color: #fff; | ||
+ | } | ||
+ | |||
+ | .open-nav a:active { | ||
+ | background: #297d89; | ||
+ | } | ||
+ | |||
+ | .sub-nav { | ||
+ | display: none; | ||
+ | margin: 0; | ||
+ | padding: 0; | ||
+ | z-index: 50; | ||
+ | } | ||
+ | |||
+ | /********************** | ||
+ | MAIN PART | ||
+ | **********************/ | ||
+ | |||
+ | .mc-container { | ||
+ | width: 100%; | ||
+ | } | ||
+ | |||
+ | .section { | ||
+ | padding: 5%; | ||
+ | width: 100%; | ||
+ | } | ||
+ | |||
+ | .blue { | ||
+ | background: steelblue; | ||
+ | height: 300px; | ||
+ | } | ||
+ | |||
+ | .green { | ||
+ | background: mediumseagreen; | ||
+ | height: 500px; | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | @media only screen and (min-width:768px) { | ||
+ | .main-nav { | ||
+ | display: flex; | ||
+ | justify-content: flex-end; | ||
+ | } | ||
+ | |||
+ | .nav-btn { | ||
+ | display: none !important; | ||
+ | } | ||
+ | |||
+ | .has-sub-nav { | ||
+ | position: relative; | ||
+ | } | ||
+ | |||
+ | .sub-nav { | ||
+ | border: 1px solid #bbb; | ||
+ | border-radius: 3px; | ||
+ | background: #fff; | ||
+ | } | ||
+ | |||
+ | .sub-nav::before { | ||
+ | content: ""; | ||
+ | width: 0; | ||
+ | height: 0; | ||
+ | border-left: 10px solid transparent; | ||
+ | border-right: 10px solid transparent; | ||
+ | border-bottom: 10px solid #bbb; | ||
+ | position: absolute; | ||
+ | top: -10px; | ||
+ | right: 20px; | ||
+ | } | ||
+ | |||
+ | .open-nav { | ||
+ | position: absolute; | ||
+ | width: 180px; | ||
+ | height: auto; | ||
+ | top: 40px; | ||
+ | right: 0; | ||
+ | bottom: auto; | ||
+ | left: auto; | ||
+ | } | ||
+ | |||
+ | .open-nav li { | ||
+ | margin: 0; | ||
+ | padding: 0; | ||
+ | } | ||
+ | |||
+ | .open-nav a { | ||
+ | display: block; | ||
+ | width: 100%; | ||
+ | margin: 0; | ||
+ | padding: 15px; | ||
+ | font-size: 100%; | ||
+ | color: #bbb; | ||
+ | } | ||
+ | |||
+ | .open-nav a:active { | ||
+ | background: #297d89; | ||
+ | } | ||
+ | |||
} | } | ||
− | @media screen and (min-width: | + | @media screen and (min-width:960px) { |
− | + | .mc-container { | |
− | + | width: 960px; | |
− | + | margin-left: auto; | |
− | + | margin-right: auto; | |
− | + | } | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} | } | ||
Revision as of 06:27, 11 June 2015