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

Line 24: Line 24:
 
<head>
 
<head>
 
<style>
 
<style>
header {
+
.logo {
 
       width: 100%;
 
       width: 100%;
 
       height: 110px;
 
       height: 110px;
Line 33: Line 33:
 
       font-family: Corbel;
 
       font-family: Corbel;
 
}
 
}
header.smaller {
+
 
    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 {
 
       position: absolute;
 
       position: absolute;
Line 165: Line 151:
 
}
 
}
 
</style>
 
</style>
<script>
+
 
function init() {
+
<nav class="logo">
    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">
</header>
+
</nav>
  
 
<nav class="ccsticky-nav">
 
<nav class="ccsticky-nav">

Revision as of 04:17, 25 August 2016

ABSTRACT

doddopskdkadsmkxlsjajidsoaxjspaoxsopa'jcisaksp[k