css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

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.

            
              <div class="home">
  <div class="box animated swing">
    <h1>Slant</h1>
    <hr />
    <p>Create slanted edges for your divs</p>
  </div>
</div>
<div class="about">
  <h2>About</h2>
  <hr class="alt" />
  <p class="animated"><span>Lorem</span> ipsum dolor sit amet, consectetur adipiscing elit. In vitae massa at odio lobortis rutrum non ut justo. Curabitur gravida quis massa et posuere. Morbi sagittis interdum metus sed tempor. Duis sollicitudin ex non ligula tristique,
    ut scelerisque est consequat. Fusce elementum, enim ac pretium suscipit, urna ipsum ultricies dolor, at molestie velit ligula et diam. Curabitur commodo fermentum sem nec cursus. Proin dapibus magna vitae pellentesque vestibulum. Quisque vel velit
    arcu. Donec rutrum convallis condimentum. Quisque blandit ex quam, a elementum risus aliquam non. Vivamus pharetra neque velit, at sodales neque molestie vitae. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec eu lacinia nibh.
  </p>
</div>
<div class="services">
  <h2>Services</h2>
  <hr />
  <div class="flex">
    <div class="collection animated">
      <div class="box-alt">
        <i class="fa fa-pie-chart" aria-hidden="true"></i>
      </div>
      <p>Curabitur gravida quis massa et posuere. Morbi sagittis interdum metus sed tempor. Interdum et malesuada fames ac ante ipsum primis in faucibus.</p>
    </div>
    <div class="collection animated">
      <div class="box-alt">
        <i class="fa fa-desktop" aria-hidden="true"></i>
      </div>
      <p>Curabitur gravida quis massa et posuere. Morbi sagittis interdum metus sed tempor. Interdum et malesuada fames ac ante ipsum primis in faucibus.</p>
    </div>
    <div class="collection animated">
      <div class="box-alt">
        <i class="fa fa-object-group" aria-hidden="true"></i>
      </div>
      <p>Curabitur gravida quis massa et posuere. Morbi sagittis interdum metus sed tempor. Interdum et malesuada fames ac ante ipsum primis in faucibus.</p>
    </div>
  </div>
</div>
<div class="contact">
  <h2>Contact</h2>
  <hr class="alt" />
  <form>
    <input type="text" name="name" id="name" />
    <input type="text" name="email" id="email" />
    <textarea name="message" id="message" cols="30" rows="10"></textarea>
    <button type"submit">Send</button>
  </form>
</div>
<div class="footer">
  <div class="social">
    <i class="fa fa-github-alt" aria-hidden="true"></i>
  </div>
  <div class="social">
    <i class="fa fa-facebook" aria-hidden="true"></i>
  </div>
  <div class="social">
    <i class="fa fa-instagram" aria-hidden="true"></i>
  </div>
  <div class="social">
    <i class="fa fa-free-code-camp" aria-hidden="true"></i>
  </div>
</div>

            
          
!
            
              /*
Thanks to Valentin Galmand for the "great button animation."

Check it out here:
https://codepen.io/asstor_/pen/ggKrpY
*/
@import url('https://fonts.googleapis.com/css?family=Poiret+One');
html,
body {
  height: 100%;
}

* {
  font-family: 'Poiret One', cursive;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

hr {
  width: 70px;
  height: 4px;
  margin: 15px auto;
  background: #fff;
  border: 0;
}

hr.alt {
  background: #666;
}

.home {
  background: linear-gradient(to right, #F1F2B5, #135058);
  height: 250px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.home::after {
  content: "";
  background: linear-gradient(to right, #F1F2B5, #135058);
  width: 100%;
  height: 200px;
  transform: skewY(-5deg);
  position: absolute;
  bottom: -100px;
  z-index: 1;
}

.box {
  display: flex;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: #fff;
  height: 200px;
  width: 300px !important;
  position: absolute;
  margin: 50px auto;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 3;
}

.box h1 {
  font-size: 2.7em;
  text-transform: uppercase;
}

.box::after,
.box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  border: 4px solid #fff;
}

.box::after {
  -webkit-transform: translate(6px, 6px);
  transform: translate(6px, 6px);
}

.box::before {
  -webkit-transform: translate(-6px, -6px);
  transform: translate(-6px, -6px);
}

.about {
  text-align: center;
  width: 100%;
}

.about h2 {
  position: relative;
  font-size: 2.5em;
  margin-top: 190px;
  color: #666;
}

.about p {
  opacity: 0;
  font-size: 1.2em;
  width: 80%;
  margin: auto;
  padding-bottom: 200px;
  color: #666;
}

.about p > span {
  margin-left: 20px;
}

.services {
  text-align: center;
  background: linear-gradient(to right, #F1F2B5, #135058);
  width: 100%;
  position: relative;
}

.services h2 {
  color: #fff;
  font-size: 2.5em;
}

.services::before {
  content: "";
  background: linear-gradient(to right, #F1F2B5, #135058);
  width: 100%;
  height: 200px;
  transform: skewY(-5deg);
  position: absolute;
  top: -100px;
  left: 0;
  z-index: -1;
}

.flex {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  width: 100%;
  margin: 100px auto;
}

.collection {
  opacity: 0;
  width: 300px;
  color: #fff;
}

.collection p {
  margin: 70px auto 50px auto;
}

.box-alt {
  display: flex;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  width: 180px;
  height: 180px;
  margin: 0 auto;
  transform: rotate(-45deg);
}

.box-alt i {
  transform: rotate(45deg);
  font-size: 4em;
}

.box-alt::after,
.box-alt::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  border: 4px solid #fff;
}

.box-alt::after {
  -webkit-transform: translate(6px, 6px);
  transform: translate(6px, 6px);
}

.box-alt::before {
  -webkit-transform: translate(-6px, -6px);
  transform: translate(-6px, -6px);
}

.contact {
  margin-top: -20px;
  text-align: center;
}

.contact h2 {
  color: #666;
  font-size: 2.5em;
}


/* Reset inputs */
.contact input,
.contact button,
.contact textarea {
  color: #666;
  font-size: 1.2em;
  display: block;
  margin: 10px auto;
  width: 70%;
  border: 0;
  outline: 0;
  padding: 10px;
  -webkit-appearance: none;
  transition: 0.2s;
}
.contact input {
  height: 50px;
  border: 3px solid #666;
}
.contact textarea {
  border: 3px solid #666;
  resize: none;
}
.contact button {
  height: 60px;
  background-color: #fff;
  font-weight: bold;
  position: relative;
  cursor: pointer;
  margin-bottom: 70px;
}
.contact input:focus,
.contact textarea:focus {
  border-color: /*#F1F2B5*/ #135058;
}
.contact button::after,
.contact button::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  right: 3px;
  border: 3px solid #666;
  -webkit-transition: -webkit-transform 0.2s;
  transition: -webkit-transform 0.2s;
  transition: transform 0.2s;
  transition: transform 0.2s, -webkit-transform 0.2s;
}
.contact button::after {
  -webkit-transform: translate(3px, 3px);
          transform: translate(3px, 3px);
}
.contact button::before {
  -webkit-transform: translate(-3px, -3px);
          transform: translate(-3px, -3px);
}
.contact button:hover::after, .contact button:hover::before {
  -webkit-transform: translate(0);
          transform: translate(0);
  border-color: /*#F1F2B5*/ #135058;
}
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  flex-direction: row;
  text-align: center;
  background: linear-gradient(to right, #F1F2B5, #135058);
}
.social {
  position: relative;
  width: 15%;
  color: #fff;
  font-size: 3em;
  margin: 10px;
}
/* Media queries */

@media (max-width: 901px) {
  .flex {
    width: 300px;
  }
  .collection {
    width: 100%;
  }
  .collection p {
    margin-bottom: 70px;
  }
}
@media (max-width: 40px) {
  .social {
    width: 145px;
  }
  .social:nth-child(even) {
    margin-left: 0;
    padding-right: 50px;
  }
  .social:nth-child(odd) {
    margin-right: 0;
    padding-left: 50px;
  }
}
            
          
!
            
              function isScrolledIntoView(elem) {
    var docViewTop = $(window).scrollTop();
    var docViewBottom = docViewTop + $(window).height();

    var elemTop = $(elem).offset().top;
    var elemBottom = elemTop + $(elem).height();

    return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
}

$(window).scroll(function () {
    $('.about p').each(function () {
        if (isScrolledIntoView(this) === true) {
            $(this).addClass('fadeIn');
        }
    });
    $('.collection').each(function () {
        if (isScrolledIntoView(this) === true) {
            $(this).addClass('fadeInLeft');
        }
    });
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console