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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

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.

Template

Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:

Screenshot

Screenshot or Custom Thumbnail

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

HTML

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<!-- 

Hello Camper!

For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding! 

- The freeCodeCamp Team 

-->
<div id="page-wrapper">
<header id="header">    
  <nav id="nav-bar">
    <ul>
      <li><a class="nav-link" href="#features">Features</a></li>
      <li><a class="nav-link" href="#ps4_vr_xp">VR Experience</a></li>
      <li><a class="nav-link" href="#pricing">Package Bundles</a></li>
    </ul>
  </nav>
 <div class="logo">
    <img id="header-img" src="http://www.scienic-data.com/freecodecamp/pics/PS4.png" alt="PS4 logo" />
  </div>
</header>

<section id="hero">
  <h2>The Future is Here</h2>
  <form id="form" action="https://www.freecodecamp.com/email-submit">
    <input name="email" id="email" type="email" placeholder="Enter your email address" required/>
    <input id="submit" type="submit" value="Get Started" class="btn"></input>
  </form>
</section>


<div class="container">
  <section id="features">
    <div class="ps4Grid">
      <div>
        <h2>Vibrant HDR Gaming</h2>
        <p>HDR-enabled PS4 games burst to life with incredible color and clarity on HDR TVs, delivering a more vibrant, realistic spectrum of colors and contrast and immersive gaming experience on both PS4 and PS4 Pro consoles. If you own a HDR-enabled TV, this setting on your PS4 will deliver a broader color spectrum much closer to what the human eye can detect.</p></div>
      <div><img src="http://www.scienic-data.com/freecodecamp/pics/Ps4vibrantGaming.jpg" alt="vibrant gaming in ps4"></img></div>
    </div> 
    <div class="ps4Grid">
    <div><img src="http://www.scienic-data.com/freecodecamp/pics/Ps4RemotePlay.jpg" alt="Ps4 Remote Play"></img>
    </div>
  <div><h2>Remote Play</h2>
    <p>Stream select games to your PC, Mac, or PlayStation Vita over your home WiFi network. With the Remote Play app for PC and Mac you can stream your favorite PS4 games to your laptop or desktop computer. Just plug a DUALSHOCK 4 wireless controller into any USB port on your computer, and your PS4 home screen and games can be streamed over your home WiFi network.</p>
  </div>
    </div>     
    <div class="ps4Grid">
    <div>
      <h2>Entertainment Apps & Services</h2>
      <p>The PlayStation 4 offers easy access to the best gaming and entertainment available. Whether you want to enjoy online multiplayer gaming with PlayStation Plus, stream live TV with PlayStation™Vue, or use your PS4 system as your streaming video hub, we’ve got you covered. The PlayStation 4 system also features native support for video streaming services like Netflix, Amazon Video, Hulu, HBO Now, Twitch, YouTube, NBA, NFL, MLB.TV, and more.</p>
    </div>  
    <div>
      <img src="http://www.scienic-data.com/freecodecamp/pics/ps4-features-streaming-services-icon-collage-03-us-13mar18.jpg"></img>  
    </div>
    </div>
    <div class="ps4Grid">
    <div>
    <img src="http://www.scienic-data.com/freecodecamp/pics/connect&Socialize.png"></img>  
    </div>  
    <div>
      <h2>Connect & Socialize</h2>
      <p>Connect with friends and see their profiles from your Friends List, and “follow” anyone including content creators, game broadcasters, and game developers to see what they are playing and sharing. Send private messages to friends or create group chats to organize game nights. Create Parties and invite friends for group voice and text chat, and join each other’s online games or continue group chat while you all play solo. </p>
    </div>
    </div>
    <div class="ps4Grid">
    <div>
      <h2>Capture & Share Your Biggest & Best Moments</h2>
      <p>Use the SHARE button on the DUALSHOCK 4 wireless controller to capture and save screenshots and video clips, and share them to your What’s New feed or upload directly to Facebook, Twitter, Twitch, YouTube, and more. Customize the SHARE button settings to take a screenshot with a single button press. You can even share songs and playlists from PlayStation Music to Facebook, Twitter, or your PSN activities “What’s New” log.</p>
    </div>  
    <div>
    <img src="http://www.scienic-data.com/freecodecamp/pics/ps4-features-screen-share-01-us-01mar18.jpg"></img>  
    </div>  
    </div>
  </section>
  <section id="ps4_vr_xp">
    <iframe id="video" width="100%" height="auto" src="https://www.youtube.com/embed/oYohnOyvJEo" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  </section>
  <section id="pricing">
    <div id="bundle1">
      <img src="http://www.scienic-data.com/freecodecamp/pics/systems-and-bundles-days-of-play-ps4-01-us-29may18.jpg"></img>
    <a href="#"><h2>Limited Edition Days of Playstation 4</h2></a>
    </div>
    <div id="bundle2">
      <img src="http://www.scienic-data.com/freecodecamp/pics/god-of-war-le-pro-bundle-box-art-01-us-06mar18.jpg"></img>
<a href="#"><h2>God of War PS4 Pro Bundle</h2></a>
    </div>
    <div id="bundle3">
      <img src="http://www.scienic-data.com/freecodecamp/pics/systems-and-bundles-cod-wwii-4-bundle-product-grid-03-us-06mar18.jpg"></img>
<a href="#"><h2>Call of Duty: WWII PS4 Bundle</h2></a>
    </div>
    <div id="bundle4">
      <img src="http://www.scienic-data.com/freecodecamp/pics/playstation-4-systems-1tb-glacier-white-ps4-pro-box-art-04-ps4-us-06mar18.jpg"></img>
<a href="#"><h2>1Tb Glacier White PS4 Pro</h2></a>
    </div>
  </section>
  <footer>
    <ul>
      <li><a href="#">Privacy</a></li>
      <li><a href="#">Terms</a></li>
      <li><a href="#">Contact</a></li>
    </ul>
    <span>Copyright 2016, Original Trombones</span>
  </footer>
</div>
</div>
              
            
!

CSS

              
                /** global element styling **/

@import 'https://fonts.googleapis.com/css?family=Lato:400,700';

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #eee;
  font-family: 'Lato', sans-serif;
}

#page-wrapper {
  position: relative;
  background-color: #1a2435;
  color:#f4f6f9;
}

li {
  list-style: none;
}

a {
  color: #000;
  text-decoration: none;
}

/** global classes styling **/

.container {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  @media (max-width: 600px) {
    max-width:100%;
    margin:0px;
    padding: 0px;
  }
}

.btn {
  padding: 0 20px;
  height: 40px;
  font-size: 1em;
  font-weight: 900;
  text-transform: uppercase;
  border: 3px black solid;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
}


// navigation bar

header {
  position: fixed;
  top: 0;
  min-height: 75px;
  padding: 0px 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  color: #000;
  background-color: #eee;
  @media (max-width: 600px) {
    width: 100%;
    flex-wrap: wrap;
    flex-direction:column-reverse;
  }
}

.logo {
  
  
  @media (max-width: 650px) {
    margin-top: 15px;
    width: 100%;
    position: relative;
  }
  
  img {
    width: 100%;
    height: 100%;
    max-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-left: 20px;
    @media (max-width: 650px) {
      margin: 0 auto;
    }
  }
}

nav {
  font-weight: 400;
  width: 80vw;
  @media (max-width: 650px) {
    margin-top: 10px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 50px;
    
    li {
     padding-bottom: 5px; 
    }
  }
  
  ul {
    width: 35vw;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    
    @media (max-width: 650px) {
      flex-direction: column;
    }
  }
}

// hero

#hero {  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 200px;
  margin-top: 50px;
  h2 {
    margin-bottom: 20px;
    word-wrap: break-word;
  }

  input[type="email"] {
    max-width: 275px;
    width: 100%;
    padding: 5px;
  }

  input[type="submit"] {
    max-width: 150px;
    width: 100%;
    height: 30px;
    margin: 15px 0;
    border: 0;
    background-color: #06295b;
    color:#a2b9d8;
    
    &:hover {
      background-color: #1e71ea;
      color:#000;
      transition: background-color 1s;
    }
  }
  
  @media (max-width: 650px) {
    margin-top: 120px;
  }
}

.grid {
  display: flex;
}
// features

#features {
  margin-top: 30px;
  width:100%;
  .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 125px;
    width: 20vw;
    color: darkorange;

    @media (max-width: 550px) {
      display: none;
    }
  }

  .desc {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 125px;
    width: 80vw;
    padding: 5px;

    @media (max-width: 550px) {
      width: 100%;
      text-align: center;
      padding: 0;
      height: 150px;
    }
  }
    
  @media (max-width: 650px) {
    margin-top: 0;
    margin-left:0;
    margin-right:0;
    padding:0px;
  }
}
.ps4Grid:nth-of-type(odd){
    display: flex;
    flex-direction:row;
    justify-content:center;
    align-items:stretch;
    margin:50px auto;
    div{      
      width: 50%;
      p, h2{        
        margin: 0px 20px 10px 20px;        
      }
      img{
        width: 100%;
        height: auto;
      }
      @media (max-width: 650px){
        width:100%;
      }
    }
    @media (max-width: 650px) {
      width: 100%;
      flex-direction: column-reverse;
      margin-left:0;
      margin-right:0;
    }
  }

.ps4Grid:nth-of-type(even){
  display: flex;
    flex-direction:row;
    justify-content:center;
    align-items:stretch;
    margin:50px auto;
    div{      
      width: 50%;
      p, h2{        
        margin: 0px 20px 10px 20px;
      }
      img{
        width: 100%;
        height: auto;
      }
      @media (max-width: 650px){
        width:100%;
      }
    }
    @media (max-width: 650px) {
      width: 100%;
      flex-direction: column;
    }
}


// how it works

#ps4_vr_xp {
  margin-top: 50px;
  display: flex;
  justify-content: center;
  
  iframe {
    max-width: 560px;
    width: 100%;
  }
}

// pricing

#pricing {
  margin-top: 60px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  
  #bundle1, #bundle2, #bundle3,#bundle4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: calc(100%  / 4);
    margin: 10px;
    /*border: 1px solid #000;*/
    border-radius: 3px;
    
    .level {
      background-color: #ddd;
      color: black;
      padding: 15px 0;
      width: 100%;
      text-transform: uppercase;
      font-weight: 700;
    }
    
    img {
      width: 100%;
      height: auto;
    }
    
    img:hover{
      width: 120%;
    }
    
    h2 {
      margin-top: 15px;
    }
    h2:hover{
      color: #f4f6f9;
    }
    
    ol {
      margin: 15px 0;
      
      li { padding: 5px 0; }
    }
    
    button {
      border: 0;
      margin: 15px 0;
      background-color: #06295b;
      color:#a2b9d8;
      font-weight: 400;
      
      &:hover {        
        background-color: #1e71ea;
        color:#000;
        transition: background-color 1s;
      }
    }
  }
  
  @media (max-width: 800px) {
    flex-direction: column;
    
    #bundle1, #bundle2, #bundle3,#bundle4 { max-width: 300px; width: 100%; margin: 0 auto; margin-bottom: 10px; }
  }
}

// footer

footer {
  margin-top: 30px;
  background-color: #ddd;
  padding: 20px;
  
  ul {
    display: flex;
    justify-content: flex-end;
    
    li {
      padding: 0 10px;
    }
  }
  
  span {
    margin-top: 5px;
    display: flex;
    justify-content: flex-end;
    font-size: 0.9em;
    color: #444;
  }
}
              
            
!

JS

              
                // coded by @atjonathan
const projectName = 'product-landing-page';
localStorage.setItem('example_project', 'Product Landing Page');
// REPLACE CDN WITH GITCDN!!!

              
            
!
999px
Learning 3D transforms in CSS requires a little perspective.

Console