Line 27: | Line 27: | ||
text-align:center | text-align:center | ||
} | } | ||
+ | |||
+ | .buttons | ||
+ | { | ||
+ | overflow:auto; | ||
+ | text-align: center; | ||
+ | font-size: 1.0em; | ||
+ | font-weight: bold; | ||
+ | line-height: 200%; | ||
+ | |||
+ | } | ||
+ | |||
+ | body { | ||
+ | position: relative; | ||
+ | } | ||
+ | #section1 {padding-top:120px;height:500px;color: #000; background-color: #FAFAFA;} | ||
+ | #section2 {padding-top:120px;height:500px;color: #000; background-color: #FFFFFF;} | ||
+ | #section3 {padding-top:120px;height:500px;color: #000; background-color: #FAFAFA;} | ||
+ | #section4 {padding-top:120px;height:500px;color: #000; background-color: #FFFFFF;} | ||
+ | |||
+ | } | ||
</style> |
</style> | ||
</head> | </head> | ||
<body> |
<body> | ||
+ | |||
+ | <center> | ||
+ | |||
+ | <div class="container-fluid"> | ||
+ | <div class="collapse navbar-collapse" id="myNavbar"> | ||
+ | <table border="1" width="50%" class="buttons"> | ||
+ | <tr> | ||
+ | <td bgcolor="#FF0000"><a href="#section1"><b>Local public engagement</b></a></td> | ||
+ | <td bgcolor="#F7FE2E"><a href="#section2"><b>International public engagement</b></a></td> | ||
+ | </tr> | ||
+ | |||
+ | <tr> | ||
+ | <td bgcolor="#2EFE64"><a href="#section3"><b>iGEM Conference</b></a></td> | ||
+ | <td bgcolor="#819FF7"><a href="#section4"><b>Reproducible and Consistency</b></a></td> | ||
+ | </tr> | ||
+ | |||
+ | </table> | ||
+ | </div> | ||
+ | </div> | ||
+ | |||
+ | <div id="section1" class="container-fluid"> | ||
+ | <h1>Toehold Switch</h1> | ||
+ | <p>This is overview about Toehold Switch.</p> | ||
+ | </div> | ||
+ | |||
+ | <div id="section2" class="container-fluid"> | ||
+ | <h1>Interlab</h1> | ||
+ | <p>This is overview about Interlab.</p> | ||
+ | </div> | ||
+ | |||
+ | |||
+ | <script> | ||
+ | $(document).ready(function(){ | ||
+ | // Add scrollspy to <body> | ||
+ | $('body').scrollspy({target: ".navbar", offset: 50}); | ||
+ | |||
+ | // Add smooth scrolling on all links inside the navbar | ||
+ | $("#myNavbar a").on('click', function(event) { | ||
+ | // Make sure this.hash has a value before overriding default behavior | ||
+ | if (this.hash !== "") { | ||
+ | // Prevent default anchor click behavior | ||
+ | event.preventDefault(); | ||
+ | |||
+ | // Store hash | ||
+ | var hash = this.hash; | ||
+ | |||
+ | // Using jQuery's animate() method to add smooth page scroll | ||
+ | // The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area | ||
+ | $('html, body').animate({ | ||
+ | scrollTop: $(hash).offset().top | ||
+ | }, 800, function(){ | ||
+ | |||
+ | // Add hash (#) to URL when done scrolling (default click behavior) | ||
+ | window.location.hash = hash; | ||
+ | }); | ||
+ | } // End if | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
+ | |||
Revision as of 04:02, 3 September 2017