Line 138: | Line 138: | ||
@media screen and (max-width: 1000px) { | @media screen and (max-width: 1000px) { | ||
− | + | .menu a:not(:first-child) {display: none;} | |
− | + | .menu a.icon { | |
− | } | + | float: right; |
+ | display: block; | ||
+ | } | ||
} | } | ||
+ | |||
+ | @media screen and (max-width: 1000px) { | ||
+ | .menu a.icon { | ||
+ | float: right; | ||
+ | display: block; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | @media screen and (max-width: 1000px) { | ||
+ | .menu.responsive {position: relative;} | ||
+ | .menu.responsive .icon { | ||
+ | position: absolute; | ||
+ | right: 0; | ||
+ | top: 0; | ||
+ | } | ||
+ | .menu.responsive a { | ||
+ | float: none; | ||
+ | display: block; | ||
+ | text-align: left; | ||
+ | } | ||
+ | } | ||
+ | |||
</style> | </style> | ||
+ | |||
+ | <script> | ||
+ | function myFunction() { | ||
+ | var x = document.getElementById("mymenu"); | ||
+ | if (x.className === "menu") { | ||
+ | x.className += " responsive"; | ||
+ | } else { | ||
+ | x.className = "menu"; | ||
+ | } | ||
+ | } | ||
+ | </script> | ||
</head> | </head> | ||
Line 150: | Line 185: | ||
<div id="burger"></div> | <div id="burger"></div> | ||
<div class="menu_wrapper"> | <div class="menu_wrapper"> | ||
− | <ul class="menu" id=" | + | <ul class="menu" id="mymenu"> |
<li id="team_name"><a href="https://2018.igem.org/Team:ASTWS-China">ASTWS-China</a></li> | <li id="team_name"><a href="https://2018.igem.org/Team:ASTWS-China">ASTWS-China</a></li> | ||
<li><a href="#">Project▾</a> | <li><a href="#">Project▾</a> | ||
Line 188: | Line 223: | ||
<li><a href="https://igem.org/2018_Judging_Form?team=ASTWS-China">Judging Form</a></li> | <li><a href="https://igem.org/2018_Judging_Form?team=ASTWS-China">Judging Form</a></li> | ||
+ | |||
+ | <li><a href="javascript:void(0);" class="icon" onclick="myFunction()">☰</a></li> | ||
</ul> | </ul> | ||
</div> | </div> |
Revision as of 23:04, 17 October 2018