Just trying out the new bootstrap 3 RC and applying some custom work to test it out.
Created
January 31, 2014 11:03
-
-
Save betul/8730096 to your computer and use it in GitHub Desktop.
A Pen by betul.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css" rel="stylesheet"> | |
| <header class="header-image"> | |
| <div class="container"> | |
| <div class="navbar navbar-fixed-top show-hide-nav"> | |
| <div class="container"> | |
| <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse"> | |
| <span class="icon-bar"></span> | |
| <span class="icon-bar"></span> | |
| <span class="icon-bar"></span> | |
| </button> | |
| <a href="#" class="navbar-brand">Bootstrap 3</a> | |
| <div class="nav-collapse collapse navbar-responsive-collapse"> | |
| <ul class="nav navbar-nav pull-right"> | |
| <li class="active"><a href="">Home</a></li> | |
| <li><a href="">Shop</a></li> | |
| <li><a href="">About Us</a></li> | |
| <li><a href="">Login</a></li> | |
| <li><a href="">Cats</a></li> | |
| </ul> | |
| </div> | |
| </div><!-- container nav --> | |
| </div><!-- fixed navbar --> | |
| <div class="row header-nav"> | |
| <div class="col-lg-4 col-sm-4"> | |
| <h1 class="header-title">Bootstrap 3</h1> | |
| </div> | |
| <div class="col-lg-8 col-sm-8"> | |
| <ul class="nav nav-pills pull-right"> | |
| <li class="active"><a href="">Home</a></li> | |
| <li><a href="">Shop</a></li> | |
| <li><a href="">About Us</a></li> | |
| <li><a href="">Login</a></li> | |
| <li><a href="">Cats</a></li> | |
| </ul> | |
| </div> | |
| </div><!-- row navigation--> | |
| <div class="row"> | |
| <div class="custom-jumbo"> | |
| <div class="col-lg-6 col-sm-6"><img src="http://i.imgur.com/KfkEXtz.png" alt="" class="img-jumbo img-responsive" /></div> | |
| <div class="col-lg-6 col-sm-6 text-jumbo"> | |
| <h1 class="page-header">Awesome product</h1> | |
| <p class="page-description">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perspiciatis voluptates beatae a id asperiores aliquam ipsam minima.</p> | |
| <a href="#" class="btn btn-primary btn-large">Click me</a> | |
| </div> | |
| </div> | |
| </div> | |
| </div><!-- container --> | |
| </header> | |
| <div id="main"> | |
| <div class="container"> | |
| <div class="page-header"> | |
| <h1 class="center">Just a title</h1> | |
| </div> | |
| <div class="page-description"> | |
| <p class="center">Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> | |
| </div> | |
| <div class="row"> | |
| <div class="col-lg-4 col-sm-4 widget-features center"> | |
| <img src="http://lorempixel.com/200/200/nature" alt="" class="img-circle img-responsive" /> | |
| <div class="caption"> | |
| <h3>Bootstrap!</h3> | |
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolore provident magnam consectetur esse amet voluptas modi ipsa velit cupiditate quidem ullam molestias expedita sint in eveniet neque ratione delectus aspernatur?</p> | |
| <a href="" class="btn btn-primary">Got it</a> | |
| </div> | |
| </div> | |
| <div class="col-lg-4 col-sm-4 widget-features center"> | |
| <img src="http://lorempixel.com/200/200/food" alt="" class="img-circle img-responsive" /> | |
| <div class="caption"> | |
| <h3>Nice</h3> | |
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolore provident magnam consectetur esse amet voluptas modi ipsa velit cupiditate quidem ullam molestias expedita sint in eveniet neque ratione delectus aspernatur?</p> | |
| <a href="" class="btn btn-primary">Got it</a> | |
| </div> | |
| </div> | |
| <div class="col-lg-4 col-sm-4 widget-features center"> | |
| <img src="http://lorempixel.com/200/200/people" alt="" class="img-circle img-responsive" /> | |
| <div class="caption"> | |
| <h3>Stepladder</h3> | |
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolore provident magnam consectetur esse amet voluptas modi ipsa velit cupiditate quidem ullam molestias expedita sint in eveniet neque ratione delectus aspernatur?</p> | |
| <a href="" class="btn btn-primary">Got it</a> | |
| </div> | |
| </div> | |
| </div><!-- row --> | |
| </div><!-- container --> | |
| </div><!-- main --> | |
| <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function() { | |
| $(window).on('scroll', function() { | |
| var scrolled = $(this).scrollTop(); | |
| var headerHeight = $("header").innerHeight(); | |
| var size = window.getComputedStyle(document.body,':after').getPropertyValue('content'); | |
| if (size == 'mobile') { | |
| $('.show-hide-nav').css('visibility','visible').css('opacity', '1'); | |
| } else { | |
| if (scrolled >= (headerHeight - 100)) { | |
| $('.show-hide-nav').css('visibility','visible').css('opacity', '1'); | |
| } else { | |
| $('.show-hide-nav').css('visibility', 'hidden').css('opacity', '0'); | |
| } | |
| } | |
| }); /*End scrolly stuff*/ | |
| $('img').hide(); | |
| $('img').each(function() { | |
| if (this.complete) { | |
| $(this).fadeIn(); | |
| } else { | |
| $(this).load(function() { | |
| $(this).fadeIn(); | |
| }); | |
| } | |
| }); //End image fade-in | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| h1,h2,h3,h4,h5,h6 { | |
| font-family: Cambria, Georgia, sans-serif !important; | |
| } | |
| p { | |
| font-family: Calibri, Helvetica, "Helvetica Neue", sans-serif !important; | |
| font-size: 1.175em; | |
| } | |
| .btn, .header-nav .active > a { | |
| background-color: #ef887d !important; | |
| border-color: #ef887d !important; | |
| } | |
| /* helpers */ | |
| .center { | |
| text-align: center; | |
| } | |
| /* header area */ | |
| header { | |
| width: 100%; | |
| padding-top: 40px; | |
| overflow: hidden; | |
| } | |
| .header-image { | |
| background: url(http://bit.ly/12nBSVN); | |
| background-size: cover; | |
| background-attachment: fixed; | |
| } | |
| .header-title { | |
| margin: 0; | |
| font-family: Calibri !important; | |
| font-size: 2em; | |
| font-weight: normal; | |
| line-height: 40px; | |
| } | |
| .nav li a { | |
| margin-left: 2px; | |
| font-size: 1em; | |
| color: #333; | |
| } | |
| .show-hide-nav { | |
| visibility: hidden; /* no transition */ | |
| opacity: 0; /* transitionable... */ | |
| transition: all .5s; | |
| } | |
| .custom-jumbo { | |
| margin-top: 100px; | |
| } | |
| .img-jumbo { | |
| position: relative; | |
| -webkit-animation: jumbo 2s; | |
| } | |
| .text-jumbo { | |
| color: white; | |
| background: rgba(0,0,0,.6); | |
| padding-bottom:20px; | |
| margin-top: 12px; | |
| border-radius: 10px; | |
| -webkit-animation: flyin 1s; | |
| } | |
| .text-jumbo a { | |
| margin-top: 20px; | |
| } | |
| @-webkit-keyframes jumbo { | |
| 0% { | |
| -webkit-transform: rotate(45deg); | |
| top: 245px; | |
| left: 0px; | |
| opacity: 0; | |
| visibility: visible; | |
| } | |
| 50% { | |
| -webkit-transform: rotate(0deg); | |
| top: 0; | |
| left: 0; | |
| } | |
| 100% { | |
| opacity: 1; | |
| } | |
| } | |
| @-webkit-keyframes flyin { | |
| 0% { | |
| position: relative; | |
| left: 30px; | |
| opacity: 0 | |
| } | |
| 100% { | |
| } | |
| } | |
| /* main area */ | |
| #main { | |
| margin-top: 60px; | |
| } | |
| .page-description { | |
| font-size: 1.2em; | |
| } | |
| .widget-features { | |
| line-height: 1.6em; | |
| margin-top: 60px; | |
| } | |
| @media screen and (max-width: 991px) { | |
| body:after { | |
| content: 'tablet'; | |
| display:none; | |
| } | |
| .jumbotron { | |
| } | |
| } | |
| @media screen and (max-width: 768px) { | |
| body:after { | |
| content: 'mobile'; | |
| display:none; | |
| } | |
| .header-nav { | |
| display: none; | |
| } | |
| .show-hide-nav { | |
| visibility: visible; | |
| opacity: 1; | |
| } | |
| .text-jumbo { | |
| margin-top: 0; | |
| padding-left: 40px !important; | |
| padding-right: 40px !important; | |
| -webkit-animation: none; | |
| border-radius: 0; | |
| } | |
| .img-jumbo { | |
| display: none !important; | |
| } | |
| .custom-jumbo { | |
| margin-top: 0; | |
| } | |
| .widget-features { | |
| margin-bottom: 100px; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment