Line 1: | Line 1: | ||
{{Team:DTU-Denmark/header.html}} <!-- Header template --> | {{Team:DTU-Denmark/header.html}} <!-- Header template --> | ||
− | <html> | + | |
+ | <html lang="en"> | ||
<head> | <head> | ||
− | + | <title>Bootstrap Example</title> | |
− | + | <meta charset="utf-8"> | |
− | + | <meta name="viewport" content="width=device-width, initial-scale=1"> | |
− | + | <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
− | + | <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
− | + | <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | |
− | + | <style> | |
− | + | body { | |
− | + | position: relative; | |
− | + | } | |
− | + | .affix { | |
− | + | top: 20px; | |
− | + | } | |
− | + | div.col-sm-9 div { | |
− | + | height: 250px; | |
− | / | + | font-size: 28px; |
− | + | } | |
− | + | #section1 {color: #fff; background-color: #1E88E5;} | |
− | + | #section2 {color: #fff; background-color: #673ab7;} | |
− | / | + | #section3 {color: #fff; background-color: #ff9800;} |
− | + | #section41 {color: #fff; background-color: #00bcd4;} | |
− | + | #section42 {color: #fff; background-color: #009688;} | |
− | + | ||
− | + | @media screen and (max-width: 810px) { | |
− | + | #section1, #section2, #section3, #section41, #section42 { | |
− | + | margin-left: 150px; | |
− | + | } | |
− | + | } | |
− | + | </style> | |
− | + | </head> | |
− | + | <body data-spy="scroll" data-target="#myScrollspy" data-offset="15"> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | / | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | <div class="container-fluid" style="background-color:#2196F3;color:#fff;height:220px;"> | |
− | + | <h1>Scrollspy & Affix Example</h1> | |
− | + | <h3>Fixed vertical sidenav on scroll</h3> | |
− | + | <p>Scroll this page to see how the navbar behaves with data-spy="affix" and data-spy="scrollspy".</p> | |
− | + | <p>The left menu sticks the page after you have scrolled a specified amount of pixels, and the links in the menu are automatically updated based on scroll position.</p> | |
− | + | </div> | |
+ | <br> | ||
− | + | <div class="container"> | |
− | + | <div class="row"> /*Must */ | |
− | + | <div class="col-md-9"> | |
− | + | <div id="overview"> | |
− | + | <h1>Overview</h1> | |
− | + | <p>Has ut facer debitis, quo eu agam purto. In eum justo aeterno. Sea ut atqui efficiantur, mandamus deseruisse at est, erat natum cum eu. Quot numquam in vel. Salutatus euripidis moderatius qui ex, eu tempor volumus vituperatoribus has, ius ea ullum facer corrumpit.</p> | |
− | + | </div> | |
− | + | ||
− | + | <div id="medal-requirements"> | |
− | + | <h1>Medal requirements</h1> | |
− | + | <p>Try to scroll this section and look at the navigation list while scrolling!</p> | |
− | + | </div> | |
− | + | <div id="bronze"> | |
− | + | <h1>Bronze</h1> | |
− | + | <p>Has ut facer debitis, quo eu agam purto. In eum justo aeterno. Sea ut atqui efficiantur, mandamus deseruisse at est, erat natum cum eu. Quot numquam in vel. Salutatus euripidis moderatius qui ex, eu tempor volumus vituperatoribus has, ius ea ullum facer corrumpit. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | <div class="row"> | + | |
− | + | ||
− | <div class="col-md-9 | + | |
− | + | ||
− | < | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | < | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | < | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | Mazim oblique aliquam cum id, nam possim scaevola adolescens ea. Ex vel causae tibique epicuri, ne dolore suavitate usu, labitur fierent insolens in mei. Cu dolore accusata pertinacia vel, clita temporibus ex qui. Aliquip splendide ne eos, corrumpit reprimique eum ea. | |
− | + | Ubique moderatius efficiantur eum et, dico oporteat recusabo ius cu, pro id modus sadipscing. Maluisset patrioque eum ad, mel eius doctus accommodare eu, minimum deleniti repudiandae mel ea. Noster nostrud diceret sea no. Eos an nullam molestiae signiferumque, vel ne laudem ignota oblique. Duo te luptatum percipitur signiferumque, at dicunt iriure dolorem his. Habeo electram has ei, usu no magna eripuit reprehendunt. Probo ferri at vis, no meis novum mei, sea probo qualisque in.</p> | |
− | + | </div> | |
− | + | <div id="silver"> | |
− | + | <h1>Silver</h1> | |
− | + | <p>Try to scroll this section and look at the navigation list while scrolling!</p> | |
− | + | </div> | |
− | < | + | <div id="gold"> |
− | + | <h1>Gold</h1> | |
− | + | <p>Try to scroll this section and look at the navigation list while scrolling!</p> | |
− | + | </div> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | < | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</div> | </div> | ||
− | < | + | <nav class="col-md-3 sm-hidden" id="myScrollspy"> |
− | + | <ul class="nav nav-pills nav-stacked" data-spy="affix" data-offset-top="205"> | |
− | <ul | + | <li><a href="#overview">OVERVIEW</a></li> |
− | <li><a href="#overview"> | + | <li class="dropdown"> |
− | <li><a href="# | + | <a class="dropdown-toggle" data-toggle="dropdown" href="#">MEDAL REQUIREMENTS <span class="caret"></span></a> |
− | <ul class=" | + | <ul class="dropdown-menu"> |
− | <li><a href="#bronze"> | + | <li><a href="#bronze">OVERVIEW</a></li> |
− | <li><a href="#silver"> | + | <li><a href="#bronze">BRONZE</a></li> |
− | <li><a href="#gold"> | + | <li><a href="#silver">SILVER</a></li> |
+ | <li><a href="#gold">GOLD</a></li> | ||
</ul> | </ul> | ||
</li> | </li> | ||
</ul> | </ul> | ||
− | </div> | + | </nav> |
+ | </div> | ||
</div> | </div> | ||
− | + | ||
− | + | ||
− | + | ||
</body> | </body> | ||
− | |||
− | |||
</html> | </html> |
Revision as of 10:51, 13 August 2016
Scrollspy & Affix Example
Fixed vertical sidenav on scroll
Scroll this page to see how the navbar behaves with data-spy="affix" and data-spy="scrollspy".
The left menu sticks the page after you have scrolled a specified amount of pixels, and the links in the menu are automatically updated based on scroll position.
Overview
Has ut facer debitis, quo eu agam purto. In eum justo aeterno. Sea ut atqui efficiantur, mandamus deseruisse at est, erat natum cum eu. Quot numquam in vel. Salutatus euripidis moderatius qui ex, eu tempor volumus vituperatoribus has, ius ea ullum facer corrumpit.
Medal requirements
Try to scroll this section and look at the navigation list while scrolling!
Bronze
Has ut facer debitis, quo eu agam purto. In eum justo aeterno. Sea ut atqui efficiantur, mandamus deseruisse at est, erat natum cum eu. Quot numquam in vel. Salutatus euripidis moderatius qui ex, eu tempor volumus vituperatoribus has, ius ea ullum facer corrumpit. Mazim oblique aliquam cum id, nam possim scaevola adolescens ea. Ex vel causae tibique epicuri, ne dolore suavitate usu, labitur fierent insolens in mei. Cu dolore accusata pertinacia vel, clita temporibus ex qui. Aliquip splendide ne eos, corrumpit reprimique eum ea. Ubique moderatius efficiantur eum et, dico oporteat recusabo ius cu, pro id modus sadipscing. Maluisset patrioque eum ad, mel eius doctus accommodare eu, minimum deleniti repudiandae mel ea. Noster nostrud diceret sea no. Eos an nullam molestiae signiferumque, vel ne laudem ignota oblique. Duo te luptatum percipitur signiferumque, at dicunt iriure dolorem his. Habeo electram has ei, usu no magna eripuit reprehendunt. Probo ferri at vis, no meis novum mei, sea probo qualisque in.
Silver
Try to scroll this section and look at the navigation list while scrolling!
Gold
Try to scroll this section and look at the navigation list while scrolling!