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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <body class="has-navbar-fixed-top">
<header id="header">
  <nav class="navbar is-fixed-top" id="nav-bar">
    <div class='navbar-brand'>
      <a class="navbar-item" href="#">
      <img src="https://seeklogo.com/images/O/oneplus-logo-B6703954CF-seeklogo.com.png" alt="OnePlus" width="30" height="30" id="header-img">
    </a>
      <div class="navbar-burger burger" data-target="navbarExampleTransparentExample">
        <span></span>
        <span></span>
        <span></span>
      </div>
    </div>
    <div id="navbarExampleTransparentExample" class="navbar-menu">
      <div class="navbar-end">
          <a class="navbar-item nav-link" href="#overview">
          Overview
          </a>
          <a class="navbar-item nav-link" href="#specs">
          Specifications
          </a>
          <div class="field is-grouped">
          <div class="navbar-item">
            <p class="control">
              <a class="button is-danger nav-link" href="#buynow">
                <span class="icon">
                  <i class="fa fa-shopping-cart"></i>
                </span>
                <span>Buy Now</span>
              </a>
            </p>
          </div>
        </div>
      </div>
    </div>
  </nav>
</header>
  <section id="overview">
    <div class="container is-fullhd">
      <div class="intro">
        <div class="phone-img">
          <img src="https://image01.oneplus.net/shop/201805/31/625/f4a19f69328227f6988ece740e6fe5ee.jpg">
        </div>
        <div id="intro-text">
          <h1 class="title is-1">OnePlus 6</h1>
          <h1 class="title is-1" id="tagline">The Speed You Need</h1>
        </div>
      </div>
      <div class="video container">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/GcXUi1Xj9i8" frameborder="0" allowfullscreen id="video"></iframe>
      </div>
    </div>
  </section>
  <section id="specs">
    <div class="container">
      <h1 class="title is-1">Tech Specs</h1>
      <div class="columns">
        <div class="column">
          <p class="title is-3">Display</p>
          <p class="subtitle is-4 is-spaced">Optic AMOLED</p>
          <p class="title is-3">Snapdragon™ 845</p>
          <p class="subtitle is-4 is-spaced">Qualcomm®</p>
          <p class="title is-3">Dual Camera</p>
          <p class="subtitle is-4 is-spaced">16 + 20 MP</p>
        </div>
      </div>
    </div>
  </section>
  <section id="buynow">
    <div class="container">
      <h1 class="title is-3">Enter Your Email to get Notified</h1>
      <form class="control" id="form" action="https://www.freecodecamp.com/email-submit">
        <div class="field">
        <label class="label">Email</label>
        <div class="control has-icons-left has-icons-right">
          <input class="input" type="email" placeholder="john@doe.com" id="email" name='email' required>
          <span class="icon is-small is-left">
            <i class="fa fa-envelope"></i>
          </span>
        </div>
      </div>
        <div class="field">
          <p class="control">
            <input type="submit" value="Submit" id="submit" class="button is-primary"></input>
            </p>
        </div>
    </form>
    </div>
  </section>
</body>
              
            
!

CSS

              
                html,body{
  background-color:#212121;
}
.intro{
  background-color:#f7f1ef;
  display:flex;
  flex-direction:row;
  height:600px;
  clip-path: polygon(
    0 0, /* left top */
    100% 0, /* right top */ 
    100% 100%, /* right bottom */
    0 90% /* left bottom */
  );
}
.phone-img{
  width:75%;
  margin-left:-15%;
  order:1;
}
#intro-text{
  order:2;
  padding-top:150px;
  text-align:center;
}
#tagline{
  font-size:65px;
}
.video{
  text-align:center;
  padding:50px;
}
#specs{
  background:url('https://opstatics.com/store/20170907/assets/images/events/2018/819/specs/specs_banner.jpg');
  background-size:cover;
  background-position:center;
  height:500px;
  padding:50px;
  clip-path: polygon(0 0, 100% 10%, 100% 100%, 0 90%);
}
#buynow{
  padding:50px;
  text-align: center;
}
/* BULMA CSS */
#specs .title, #specs .subtitle{
  color:white;
  font-weight:normal;
}
#buynow .title{
  color:white;
  font-weight:normal;
}
.title{
  font-weight:normal;
}
.navbar{
  background: black;
}
.navbar-item{
  color: white;
}
a.navbar-item:hover{
  background-color:black;
  color: white;
}
.label{
  color:white;
  font-size:20px;
  font-weight:normal;
}
.navbar-menu{
  background-color:#000;
}
/* 
NOTES

make intro height responsive

*/
@media only screen and (max-width: 845px){
  .intro{
    height:400px;
  }
  .phone-img{
    width: 95%;
    margin-left:0;
  }
  #intro-text{
    padding-top:100px;
  }
}
@media only screen and (max-width:650px){
  iframe{
    width:80%;
    height:80%;
  }
}
@media only screen and (max-width:575px){
  #intro-text .title{
    font-size:225%;
  }
}
@media only screen and (max-width:475px){
  .intro{
    height:300px;
  }
}
              
            
!

JS

              
                (function() {
        var burger = document.querySelector('.burger');
        var nav = document.querySelector('#'+burger.dataset.target);
        burger.addEventListener('click', function(){
          burger.classList.toggle('is-active');
          nav.classList.toggle('is-active');
        });
      })();
              
            
!
999px

Console