|
|
Line 3: |
Line 3: |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <style> | | <style> |
− | body {
| + | |
− | margin: 0;
| + | |
− | font-size: 28px;
| + | |
− | }
| + | |
− | | + | |
− | .header {
| + | |
− | background-color: #f1f1f1;
| + | |
− | padding: 30px;
| + | |
− | text-align: center;
| + | |
− | }
| + | |
− | | + | |
− | #navbar {
| + | |
− | overflow: hidden;
| + | |
− | background-color: #333;
| + | |
− | }
| + | |
− | | + | |
− | #navbar a {
| + | |
− | float: left;
| + | |
− | display: block;
| + | |
− | color: #f2f2f2;
| + | |
− | text-align: center;
| + | |
− | padding: 14px 16px;
| + | |
− | text-decoration: none;
| + | |
− | font-size: 17px
| + | |
− | }
| + | |
− | | + | |
− | #navbar a:hover {
| + | |
− | background-color: #ddd;
| + | |
− | color: black;
| + | |
− | }
| + | |
− | | + | |
− | #navbar a.activate {
| + | |
− | background-color: #4CAF50;
| + | |
− | color: white;
| + | |
− | }
| + | |
− | | + | |
− | .content {
| + | |
− | padding: 16px;
| + | |
− | }
| + | |
− | | + | |
− | .sticky {
| + | |
− | position: fixed;
| + | |
− | top: 0;
| + | |
− | width: 100%;
| + | |
− | }
| + | |
− | | + | |
− | .sticky + .content {
| + | |
− | padding-top: 60px
| + | |
− | }
| + | |
| </style> | | </style> |
| </head> | | </head> |
| | | |
| <body style="background-color:#C0C0C0;"> | | <body style="background-color:#C0C0C0;"> |
− | <h1>Meet the team</h1> | + | |
− | <p> Andres Alvarado and his followers</p>
| + | |
− | | + | |
− | <div id="navbar">
| + | |
− | <a class="active" href="javascript:void(0)">Home</a>
| + | |
− | <a href="javascript:void(0)">Team</a>
| + | |
− | <a href="javascript:void(0)">Collaborations</a>
| + | |
− | </div>
| + | |
− | | + | |
− | <div class="content">
| + | |
− | <h3>Some Example Information</h3>
| + | |
− | <p>Some text to enable scrolling.. Lorem ipsum dolor sit amet, illum definitiones no quo, maluisset concludaturque et eum, altera fabulas ut quo. Atqui causae gloriatur ius te, id agam omnis evertitur eum. Affert laboramus repudiandae nec et. Inciderint efficiantur his ad. Eum no molestiae voluptatibus.</p>
| + | |
− | <p>Some text to enable scrolling.. Lorem ipsum dolor sit amet, illum definitiones no quo, maluisset concludaturque et eum, altera fabulas ut quo. Atqui causae gloriatur ius te, id agam omnis evertitur eum. Affert laboramus repudiandae nec et. Inciderint efficiantur his ad. Eum no molestiae voluptatibus.</p>
| + | |
− | <p>Some text to enable scrolling.. Lorem ipsum dolor sit amet, illum definitiones no quo, maluisset concludaturque et eum, altera fabulas ut quo. Atqui causae gloriatur ius te, id agam omnis evertitur eum. Affert laboramus repudiandae nec et. Inciderint efficiantur his ad. Eum no molestiae voluptatibus.</p>
| + | |
− | <p>Some text to enable scrolling.. Lorem ipsum dolor sit amet, illum definitiones no quo, maluisset concludaturque et eum, altera fabulas ut quo. Atqui causae gloriatur ius te, id agam omnis evertitur eum. Affert laboramus repudiandae nec et. Inciderint efficiantur his ad. Eum no molestiae voluptatibus.</p>
| + | |
− | <p>Some text to enable scrolling.. Lorem ipsum dolor sit amet, illum definitiones no quo, maluisset concludaturque et eum, altera fabulas ut quo. Atqui causae gloriatur ius te, id agam omnis evertitur eum. Affert laboramus repudiandae nec et. Inciderint efficiantur his ad. Eum no molestiae voluptatibus.</p>
| + | |
− | </div>
| + | |
− | | + | |
| <script> | | <script> |
− | window.onscroll = function() {myFunction()}; | + | |
− | | + | |
− | var navbar = document.getElementById("navbar");
| + | |
− | var sticky = navbar.offsetTop;
| + | |
− | | + | |
− | function myFunction() {
| + | |
− | if (window.pageYOffset >= sticky) {
| + | |
− | navbar.classList.add("sticky")
| + | |
− | } else {
| + | |
− | navbar.classList.remove("sticky");
| + | |
− | }
| + | |
− | }
| + | |
| </script> | | </script> |
| | | |
| </body> | | </body> |
| </html> | | </html> |