SKammerman (Talk | contribs) |
SKammerman (Talk | contribs) |
||
(474 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{UFlorida}} | + | {{UFlorida/Menu2}} |
+ | |||
+ | |||
<html> | <html> | ||
<head> | <head> | ||
+ | <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> | ||
+ | <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> | ||
+ | <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> | ||
+ | <script src="http://code.jquery.com/jquery-2.1.0.min.js"></script> | ||
+ | |||
+ | <style> | ||
− | |||
− | |||
− | |||
body { | body { | ||
− | font: | + | font: 400 15px Lato, sans-serif; |
− | + | background-color: rgb(192,192,192); | |
− | + | ||
} | } | ||
− | + | footer .glyphicon { | |
− | + | font-size: 20px; | |
− | + | margin-bottom: 20px; | |
− | + | color: #f4511e; | |
− | color: # | + | |
} | } | ||
− | + | img { | |
− | + | width: 100%; | |
− | + | height:auto; | |
− | + | } | |
− | + | p { | |
− | + | margin: .4em 0 .5em 0; | |
− | + | line-height: 0em; | |
− | + | } | |
− | + | p { | |
− | + | margin: 0 0 0px; | |
− | + | } | |
− | + | .navbar { | |
− | + | position: relative; | |
− | + | min-height: 50px; | |
− | + | margin-bottom: 0px; | |
− | + | border: 1px solid transparent; | |
− | + | } | |
− | + | .img-fluid { | |
− | + | max-width: 100%; | |
− | + | height: auto; | |
− | + | } | |
− | + | </style> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</head> | </head> | ||
− | <body> | + | <body id="myPage" data-spy="scroll" data-target=".navbar" data-offset="60"> |
− | + | <div class="img-fluid"> | |
− | + | <img src="https://static.igem.org/mediawiki/2017/2/2f/UFlorida_Home_Pic.jpg" width="600" height="300"/> | |
− | + | </div> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | < | + | <br> |
− | <div class=" | + | <div class="img-fluid"> |
− | + | <img src="https://static.igem.org/mediawiki/2017/6/61/IGEM_Home_Design_2.jpg" class="img-fluid" alt="Responsive image"> | |
− | + | ||
− | + | ||
</div> | </div> | ||
− | < | + | <footer class="container-fluid text-center"> |
− | + | <a href="#myPage" title="To Top"> | |
− | + | <span class="glyphicon glyphicon-chevron-up"></span> | |
− | + | ||
− | <a href="#" | + | |
− | <span class="glyphicon glyphicon- | + | |
</a> | </a> | ||
− | </ | + | </footer> |
− | < | + | <script> |
− | + | $(document).ready(function(){ | |
− | + | // Add smooth scrolling to all links in navbar + footer link | |
− | + | $(".navbar a, footer a[href='#myPage']").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 (900) specifies the number of milliseconds it takes to scroll to the specified area | ||
+ | $('html, body').animate({ | ||
+ | scrollTop: $(hash).offset().top | ||
+ | }, 900, function(){ | ||
+ | |||
+ | // Add hash (#) to URL when done scrolling (default click behavior) | ||
+ | window.location.hash = hash; | ||
+ | }); | ||
+ | } // End if | ||
+ | }); | ||
+ | |||
+ | $(window).scroll(function() { | ||
+ | $(".slideanim").each(function(){ | ||
+ | var pos = $(this).offset().top; | ||
+ | |||
+ | var winTop = $(window).scrollTop(); | ||
+ | if (pos < winTop + 600) { | ||
+ | $(this).addClass("slide"); | ||
+ | } | ||
+ | }); | ||
+ | }); | ||
+ | }) | ||
+ | </script> | ||
</body> | </body> | ||
</html> | </html> |
Latest revision as of 01:58, 2 November 2017