Line 940: | Line 940: | ||
ul>.dropdown>a{ | ul>.dropdown>a{ | ||
color:white !important; | color:white !important; | ||
− | + | border:solid 0px #94ecf7; | |
− | + | border-radius: 25px !important; | |
− | + | text-align:center !important; | |
− | + | list-style-type: none !important; | |
− | + | text-decoration: none; | |
− | + | transition-duration: 0.5s; | |
− | + | padding-top: 4px; | |
− | + | padding-bottom: 4px; | |
− | + | padding-left: 9px;color:white !important; | |
+ | border:solid 0px #94ecf7; | ||
+ | border-radius: 25px !important; | ||
+ | text-align:center !important; | ||
+ | list-style-type: none !important; | ||
+ | text-decoration: none; | ||
+ | transition-duration: 0.5s; | ||
+ | padding-top: 4px; | ||
+ | padding-bottom: 4px; | ||
+ | padding-left: 9px; | ||
} | } | ||
+ | |||
+ | .test { | ||
+ | color:blue !important; | ||
+ | border:solid 0px #94ecf7; | ||
+ | border-radius: 25px !important; | ||
+ | text-align:center !important; | ||
+ | list-style-type: none !important; | ||
+ | text-decoration: none; | ||
+ | transition-duration: 0.5s; | ||
+ | padding-top: 4px; | ||
+ | padding-bottom: 4px; | ||
+ | padding-left: 9px; | ||
+ | } | ||
+ | |||
.dropdown{ | .dropdown{ | ||
background:#101654; | background:#101654; | ||
Line 1,032: | Line 1,055: | ||
<ul class="main-menu" id="menu" style="list-style-image: none;"> | <ul class="main-menu" id="menu" style="list-style-image: none;"> | ||
− | <li class="dropdown"><a href="https://2018.igem.org/Team:NCTU_Formosa" class="dropbtn">Home</a></li> | + | <li class="dropdown"><a href="https://2018.igem.org/Team:NCTU_Formosa" class="dropbtn" id="navigation">Home</a></li> |
<li class="dropdown"> | <li class="dropdown"> | ||
Line 1,135: | Line 1,158: | ||
); | ); | ||
}); | }); | ||
+ | |||
+ | window.onscroll = function() {myFunction()}; | ||
+ | |||
+ | function myFunction() { | ||
+ | if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) { | ||
+ | element.classList.remove("ul li a"); | ||
+ | document.getElementById("navigation").className = "test"; | ||
+ | } else { | ||
+ | document.getElementById("navigation").className = ""; | ||
+ | } | ||
+ | } | ||
+ | |||
</script> | </script> | ||
</html> | </html> |
Revision as of 13:07, 21 September 2018