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="viewport-typography blog-example">
        
  <div class="em">
    EMs
    <div>
      This is 1.5em
      <div>
        This is also 1.5em
        <div>
          Yet again, 1.5em
        </div>
      </div>
    </div>
  </div>

  <div class="rem">
    REMs
    <div>
      This is 1.5rem
      <div>
        This is also 1.5rem
        <div>
          Yet again, 1.5rem
        </div>
      </div>
    </div>
  </div>

  <div class="vh">
    <p><strong>Viewport Height</strong> Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
  </div>

  <div class="vw">
    <p><strong>Viewport Width</strong> Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
  </div>

  <div class="demo-1vmin">
    <p><strong>Viewport Min</strong> Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
  </div>

  <div class="demo-1vmax">
    <p><strong>Viewport Max</strong> Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
  </div>

</div>
            
          
!
            
              .blog-example {
  padding: 20px 0;
}

/* ********************************* */
/* Working with REM and Viewport Sized Typography */
/* ********************************* */

.viewport-typography .em,
.viewport-typography .rem,
.viewport-typography .vh,
.viewport-typography .vw,
.viewport-typography .demo-1vmin,
.viewport-typography .demo-1vmax {
  font-size: 14px;
  margin-bottom: 40px;
  color: #737373;
}

.viewport-typography .em div {
  font-size: 1.5em;
}

.viewport-typography .rem div {
  font-size: 14px;
}

.viewport-typography .rem div  {
  font-size: 1.5rem;
}

.viewport-typography .vh p {
  font-size: 2.5vh;
}

.viewport-typography .vw p {
  font-size: 2.5vw;
}

.viewport-typography .demo-1vmin p {
  font-size: 6vmin;
}

.viewport-typography .demo-1vmax p {
  font-size: 2.5vmax;
}
            
          
!
            
              $(function () {
  causeRepaintsOn = $("h1, h2, h3, p");

  $(window).resize(function() {
    causeRepaintsOn.css("z-index", 1);
  });
});
            
          
!
999px
Loading ..................

Console