Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Pure CSS single page application "
Bootstrap 4.1.1 Snippet by
Umerfarooq
4.1.1
Preview
HTML
CSS
View Full Screen
Fork
Fork this
2.0K
 
1 Fav
Post to Facebook
Tweet this
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <script src="https://kit.fontawesome.com/d5fba335cd.js" crossorigin="anonymous"></script> <nav> <a href="#first"><i class="far fa-user"></i></a> <a href="#second"><i class="fas fa-briefcase"></i></a> <a href="#third"><i class="far fa-file"></i></a> <a href="#fourth"><i class="far fa-address-card"></i></a> </nav> <div class= 'container'> <section id= 'first'> <h1>First</h1> </section> <section id= 'second'> <h1>Second</h1> </section> <section id= 'third'> <h1>Third</h1> </section> <section id= 'fourth'> <h1>Fourth</h1> </section> </div>
* { margin: 0; padding: 0; box-sizing: border-box; } :root { --primary-color: #D96AA7; --secondary-color: #422C73; --complimentary-color: #88BFB5; --contrast-color: #F2E527; --light-color: #D2A9D9; } .container { background: #191919; min-height: 100vh; font-family: Montserrat, sans-serif; } nav a { font-size: 40px; color: #fff; text-decoration: none; padding: 20px; text-align: center; } nav { position: fixed; left: 0; z-index: 50; display: flex; justify-content: space-around; flex-direction: column; height: 100vh; background: var(--secondary-color); } section { position: absolute; top: 0; height: 100vh; width: 0; opacity: 0; transition: all ease-in .5s; display: flex; justify-content: center; align-items: center; } section h1 { color: #fff; font-size: 50px; text-transform: uppercase; opacity: 0; } /* Styles applied on trigger */ section:target { opacity: 1; position: absolute; left: 0; width: 100%; height: 100%; z-index: 10; } section:target h1 { opacity: 0; animation: 2s fadeIn forwards .5s; } #first { background:var(--primary-color); } #second { background: var(--complimentary-color); } #third { background: var(--contrast-color); } #fourth { background: var(--light-color); } @keyframes fadeIn { 100% { opacity:1 } }
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76