Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <header>

  <a href="https://codepen.io/XenoCoder/" target="_blank" class="navLinks title" title="My Codepen profile">Benjamin Bogle</a>

  <nav class="sectionLinks">

    <ul>
      <li><a href="#about-me" class="navLinks" title="About">About</a></li>
      <li><a href="#port" class="navLinks" title="Portfolio">Portfolio</a></li>
      <li><a href="#contact" class="navLinks" title="Contact">Contact</a></li>
    </ul>

  </nav>

</header>

<a name="about-me"></a>

<div class="mainSections aboutMe">
  <div class="container-fluid">
    <div class="row">
      <div class="col-lg-8">
        <div class="row">
          <div class="col-xl-12">

            <span id="aboutInfo">Name: Benjamin Bogle <br> Age: 14<br>Interests: Programming, music, sports<br> Goal: Front End/Full Stack Web Developer</span>

          </div>
        </div>

        <div class="row">
          <div class="col-xl-12">

            <span class="center-block text-center occupation">High School Student</span>

          </div>
        </div>
      </div>
      <div class="col-lg-4">

        <a href="https://codepen.io/XenoCoder/" target="_blank"><img src="https://avatars1.githubusercontent.com/u/23668162" class="img-circle img-responsive center-block logoPic" title="My Codepen profile" alt="A picture of me"/></a>
        
        <a href="https://www.linkedin.com/in/benjamin-bogle-378216141/" target="_blank"><i class="fa fa-linkedin-square fa-3x logos" aria-hidden="true" title="LinkedIn"></i></a>
        <a href="https://github.com/XenoCoding" target="_blank"><i class="fa fa-github fa-3x logos" aria-hidden="true"></i></a>
      </div>
    </div>
  </div>
</div>

<a name="port"></a>

<div class="mainSections portfolio">
  <div class="row">
    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
      <a href="https://codepen.io/XenoCoder/pen/XRJyGQ" target="_blank">
        <div class="thumbnail" title="Random Quote Generator">
          <div class="caption">
            <h5>Random Quote Generator</h5>
            <p>Displays random quotes for the user</p>
          </div>
          <img src="https://preview.ibb.co/n6uGkk/Random_Quote_Generator.png" alt="Random Quote Generator">
        </div>
      </a>
    </div>
    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
      <a href="https://codepen.io/XenoCoder/pen/BRNNdg" target="_blank">
        <div class="thumbnail" title="Wikipedia Viewer">
          <div class="caption">
            <h5>Wikipedia Viewer</h5>
            <p>Searches the wiki for its articles</p>
          </div>
          <img src="https://preview.ibb.co/jqKcrQ/Wikipedia_Viewer.png" alt="Wikipedia Viewer">
        </div>
      </a>
    </div>
    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
      <a href="https://codepen.io/XenoCoder/pen/MmYRwL" target="_blank">
        <div class="thumbnail" title="Local Weather App">
          <div class="caption">
            <h5>Local Weather App</h5>
            <p>Display's the weather for the user's location</p>
          </div>
          <img src="https://preview.ibb.co/njJyy5/Local_Weather_App.png" alt="Local Weather App">
        </div>
      </a>
    </div>
    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
      <a href="https://codepen.io/XenoCoder/pen/GmJyVd" target="_blank">
        <div class="thumbnail" title="Twitch Streamers">
          <div class="caption">
            <h5>Twitch Streamers</h5>
            <p>Displays information about Twitch streamers</p>
          </div>
          <img src="https://preview.ibb.co/hy22Qk/Twitch_Streamers.png" alt="Twitch Streamers">
        </div>
      </a>
    </div>
    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
      <a href="https://scratch.mit.edu/projects/134334752/#fullscreen" target="_blank">
        <div class="thumbnail" title="Xeno Memorization v1.0">
          <div class="caption">
            <h5>Xeno Memorization v1.0</h5>
            <p>A Scratch project card game</p>
          </div>
          <img src="http://imagizer.imageshack.us/v2/320x240q90/924/YL2xpI.png" alt="Scratch project - Xeno Memorization v1.0">
        </div>
      </a>
    </div>
    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
      <a href="https://scratch.mit.edu/projects/161167909/#fullscreen" target="_blank">
        <div class="thumbnail" title="Bezier Curves v1.0">
          <div class="caption">
            <h5>Bezier Curves v1.0</h5>
            <p>A Scratch project simulation</p>
          </div>
          <img src="http://imagizer.imageshack.us/v2/320x240q90/922/L5x7FW.png" alt="Scratch Project - Bezier Curves v1.0">
        </div>
      </a>
    </div>
    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
      <a href="#" target="_blank">
        <div class="thumbnail">
          <div class="caption">
            <h5>Thumbnail Headline</h5>
            <p>short thumbnail description</p>
          </div>
          <img src="" alt="placeholder">
        </div>
      </a>
    </div>
    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
      <a href="#" target="_blank">
        <div class="thumbnail">
          <div class="caption">
            <h5>Thumbnail Headline</h5>
            <p>short thumbnail description</p>
          </div>
          <img src="" alt="placeholder">
        </div>
      </a>
    </div>
  </div>
</div>

<a name="contact"></a>

<div class="contact mainSections">

  <h3 class="text-center">Want to say something?</h3>

  <form class="form-horizontal" role="form">

    <div class="form-group">
      <label for="contact-name" class="col-sm-2 control-label">Name</label>
      <div class="col-sm-10">
        <input type="text" class="form-control contactName" placeholder="Richard Brunsworth" />
      </div>
    </div>

    <div class="form-group">
      <label for="contact-email" class="col-sm-2 control-label">Email</label>
      <div class="col-sm-10">
        <input type="email" class="form-control contactEmail" placeholder="example@domain.com" />
      </div>
    </div>

    <div class="form-group">
      <label for="contact-message" class="col-sm-2 control-label">Message</label>
      <div class="col-sm-10">
        <textarea class="form-control" rows="4"></textarea>
      </div>
    </div>

    <button type="submit" class="btn btn-primary btn-block submit" title="Submit">Submit</button>

  </form>
</div>

<div id="footer">

  <h3 class="text-center">Coded and designed by Benjamin Bogle</h3>
  <h5 class="text-center">&copy;2017 - Benjamin Bogle</h5>

</div>
              
            
!

CSS

              
                a:hover, a:focus{
  text-decoration: none;
}

#aboutInfo {
  font-size: 20px;
}

.aboutMe {
  background-color: #002045;
  box-shadow: 0px 10px 50px #000000;
  padding-top: 15% !important;
  text-align: center;
}

body {
  background-image: url("https://www.planwallpaper.com/static/images/518151-backgrounds_W3qVPu2.jpg");
  background-position:center;
  background-size:cover;
  background-attachment:fixed;
  color: #FFFFFF;
  font-family: Raleway;
}

.contact {
  background-color: #002045;
  opacity: 0;
  border-bottom: none !important;
  box-shadow: 0px -40px 50px #000;
}

#footer {
  background-color: #000520;
  color: #CCCCCC;
  box-shadow: 0px 0px 15px #002;
  padding: 1%;
  width: 100%;
}

h5 {
  font-weight: bold;
}

header {
  background-color: #111;
  opacity: 1;
  padding: 3%;
  position: fixed;
  top: 0;
  transition: padding 500ms;
  width: 100%;
  z-index: 100;
}

.logoPic {
  box-shadow: none;
  transition-property: width, box-shadow;
  transition-duration: 500ms;
}

.logoPic:hover{
  box-shadow: 0px 0px 20px #200;
}

.logos {
  margin:5%;
  text-align: center;
  margin-top: 3%;
}

.mainSections {
  padding: 5%;
  border-bottom: 30px solid black;
}

nav a{
  text-transform: uppercase;
}
nav li {
  display: inline-block;
}
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.navLinks {
  text-decoration: none;
  color: #fff;
  padding: 0%;
  transition-property: color;
  transition-duration: 500ms;
  margin-right: 10px;
}

.navLinks:hover{
  color: #aaa;
}

.occupation {
  font-family: Lobster;
  font-size: 40px;
  margin: 3%;
}

.pageDivider {
  background-color: #3B4660;
  border-radius: 5px;
  box-shadow: 0px 0px 15px #101;
  margin: 10% 0% 0% 0%;
  opacity: 0;
}

.portfolio {
  text-align: center;
  opacity: 0;
}

.removePadding{
  padding: 1%;
}

.sectionLinks {
  text-align: right;
}

.submit {
  background-color: #358;
  color: #fff;
  border: 1px solid #136;
  position: relative;
  margin-left: auto;
  margin-right: auto;
  transition-property: background-color, box-shadow, border;
  transition-duration: 500ms;
  width: 65%;
}

.submit:hover{
  background-color: #579;
  box-shadow: 0px 0px 10px #002;
  border: 1px solid #558;  
}

.thumbnail {
  box-shadow: -10px 10px 50px #000;
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-bottom: 5%;
}

.thumbnail .caption {
  position: absolute;
  top: 0;
  left: 0;
  background-color: #244591;
  color: #CCCCCC !important;
  opacity: 0;
  text-align: center;
  z-index: 2;
  width: 50%;
  height: 50%;
  padding: 1%;
}

.title {
  float: left;
  margin-top: 0%;
}

@media screen and (max-width: 400px) {
  .container {
    padding: 15% 5% 3% 5%;
  }
}

@media screen and (max-width: 500px) {
  #aboutInfo {
    font-size: 12px;
    margin: 1%;
  }
  body {
    text-align: center;
    font-size: 14px;
  }
  header {
    font-size: 10px;
    padding:3%;
  }
  .logoPic {
    width: 40%;
    margin-top: 5%;
  }
  .logoPic:hover{
    width: 42%;
  }
  .occupation {
    font-size: 16px;
  }
  p {
    display: none;
  }
  .title {
    font-size: 14px;
    margin-top: 0px;
  }
  .thumbnail{
    margin-left:auto;
    margin-right:auto;
    width: 75%;
    height: 100px;
  }
}

@media screen and (min-width:1000px) {
  .logoPic {
    width: 75%;
  }
  .thumbnail{
    width:78%;
  }
}
              
            
!

JS

              
                $(document).scroll(function() { 
  
  if($(window).scrollTop() === 0) {
    console.log('top');
    if($("header").hasClass('removePadding')){
      $("header").removeClass('removePadding');  
    }
  }
  else{
    console.log('notTop');
    if(!$("header").hasClass('removePadding')){
      $("header").addClass('removePadding'); 
    }
  }
  
});

$(document).ready(function() {
  $(".thumbnail").hover(
    function() {
      $(this)
        .find(".caption")
        .animate({ opacity: 1, width: "100%", height: "100%" }, 300);
    },
    function() {
      $(this)
        .find(".caption")
        .animate({ opacity: 0, width: "50%", height: "50%" }, 500);
    }
  );

  function scrollAppear(element) {
    var topOfElement = element.offset().top;
    var bottomOfElement = element.offset().top + element.outerHeight(true);

    $(window).bind("scroll", function() {
      var scrollTopPosition = $(window).scrollTop() + $(window).height();
      var windowScrollTop = $(window).scrollTop();

      if (
        scrollTopPosition > topOfElement &&
        scrollTopPosition < bottomOfElement
      ) {
        element.animate(
          {
            opacity: 1
          },
          1500
        );
      }
    });
  }

  $(".navLinks").click(function() {
    $(".mainSections").animate({ opacity: 1 }, 1500);
    $("#footer").animate({ opacity: 1 }, 1500);
    $(".pageDivider").animate({ opacity: 1 }, 1500);
  });

  scrollAppear($(".portfolio"));
  scrollAppear($(".contact"));
  scrollAppear($(".pageDivider"));
});

              
            
!
999px

Console