cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              <p>Here's a <span class="the-trick">cool</span> trick for replacing text with an icon font icon inline. Copying and pasting still works normally. It might be useful if you want to use a wordmark as an icon among other things. (Highlight the first sentece and copy/paste.)</p>
            
          
!
            
              @import url(http://weloveiconfonts.com/api/?family=entypo);

html,
body {
  background: #1e8cbe;
}
p {
  max-width: 600px;
  margin: 50px auto;
  color: #fff;
  font: 21px/1.4em Helvetica, Arial, sans-serif;
}
.the-trick {
  // Retains width/height of original word
  display: inline-block;
  position: relative;
  padding: 4px 16px;
  right: 9999px;

  &:after {
    content: "\1f680";
    position: absolute;
    top: 2px;
    right: -9999px;
    width: 100%;
    text-align: center;
    height: 100%;
    color: #fff;
    font-size: 50px;
    line-height: 30.8px;
    font-family: 'entypo', sans-serif;
  }
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console