cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              
<div class="hero">
  <video autoplay loop src="https://bit.ly/2eki5YI"></video>
  <header class="grid-overlay"> <h1>Hero Background Video</h1> </header>
</div>

<div class="content-area grid-overlay"></div>



            
          
!
            
              @import "bourbon";
@import url('https://fonts.googleapis.com/css?family=Michroma');
$bgcolor: rgba(179, 27, 27, 0.95);

*, *:before, *:after {
  box-sizing: inherit;
}

* {
  margin: 0;
  padding: 0;
  border: 0 none;
  position: relative;
}

body {
  @include animation(fadeIn 2s ease-in-out);
  font-family: 'Michroma', sans-serif;
  background-color: $bgcolor;
  color: #e3dac9;
}

.hero {
  width: 100%;
  height: 100vh; 
  overflow: hidden;
  
  video {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
  
  header {
    @include transform( translate(-50%, -50%) );
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    height: 100%;
    h1 {
      @include transform( scale(1, 2) );
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      height: 100%; 
      font-size: 4rem;
      text-transform: uppercase;
      word-spacing: 1vw;
      letter-spacing: 0.25rem;
    }
  }
}

.content-area {
  min-height: 50vh;
  padding: 3rem 6rem;
  font-size: 28px;
  letter-spacing: 3px;
  line-height: 4rem;
}


.grid-overlay {
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAAEFsT2yAAAACXBIWXMAAAsSAAALEgHS3X78AAAAFElEQVR4nGNhYGBwYIET////ZwAAETIDym2lzEcAAAAASUVORK5CYII=);
  background-size: 2px 2px;
  background-position: 0 0;
  background-repeat: repeat;
}

@include keyframes(fadeIn) {
  from { opacity: 0; }
  to   { opacity: 1; }
}

            
          
!
            
              $(".content-area").append("Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary")
            
          
!
999px
Loading ..................

Console