Difference between revisions of "Team:CGU Taiwan/Home"

Line 24: Line 24:
 
<head>
 
<head>
 
<style>
 
<style>
.logo {
+
header {
 
       width: 100%;
 
       width: 100%;
 
       height: 110px;
 
       height: 110px;
Line 33: Line 33:
 
       font-family: Corbel;
 
       font-family: Corbel;
 
}
 
}
.logo.smaller {
+
header.smaller {
 
     height: 75px;
 
     height: 75px;
 +
}
 +
header.smaller h1#logo {
 +
        height: 40px;
 +
        line-height: 40px;
 +
        font-size: 30px;
 +
    }
 +
    header.smaller nav {
 +
        height: 35px;
 +
    }
 +
    header.smaller nav a {
 +
        line-height: 35px;
 +
    }
 
}
 
}
 
.img1 {
 
.img1 {
Line 153: Line 165:
 
}
 
}
 
</style>
 
</style>
 
+
<script>
<nav class="logo">
+
function init() {
 +
    window.addEventListener('scroll', function(e){
 +
        var distanceY = window.pageYOffset || document.documentElement.scrollTop,
 +
            shrinkOn = 300,
 +
            header = document.querySelector("log");
 +
        if (distanceY > shrinkOn) {
 +
            classie.add(header,"smaller");
 +
        } else {
 +
            if (classie.has(header,"smaller")) {
 +
                classie.remove(header,"smaller");
 +
            }
 +
        }
 +
    });
 +
}
 +
window.onload = init();
 +
</script>
 +
<header>
 
<img src="https://static.igem.org/mediawiki/2016/b/bb/CGU_Taiwan--logo2.jpg" class="img1">
 
<img src="https://static.igem.org/mediawiki/2016/b/bb/CGU_Taiwan--logo2.jpg" class="img1">
</nav>
+
</header>
  
 
<nav class="ccsticky-nav">
 
<nav class="ccsticky-nav">

Revision as of 04:16, 25 August 2016

ABSTRACT

doddopskdkadsmkxlsjajidsoaxjspaoxsopa'jcisaksp[k