123

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.

            
              <a class="fancy" href="#">Our fancy link</a><br>
<a class="buggy" href="#">Buggy, but almost good</a><br>
<a class="just-border" href="#">Just a border</a><br>
<a class="old-school" href="#">Old school regular</a><br>

<div class="row">
  <p class="column">Cat ipsum dolor sit amet, annoy the old grumpy cat. <a class="fancy" href="#">Notice how well it works with multi-line links! Chew the plant run in circles. Cats go for world domination.</a> I like frogs and 0 gravity yet eat half my food and ask for more.</p>
   <p class="column">Just <a class="buggy" href="#">in case you are wondering, this is Cat Ipsum. Does the underline appear buggy?</a> Have my breakfast spaghetti yarn step on your keyboard while you're gaming and then turn in a circle. Destroy house in 5 seconds.
  </p>
</div>
            
          
!
            
              a.fancy, a.fancy:visited {
    text-decoration: none;
    background-image:
      linear-gradient(
          transparent 2px,
          #2ed392 2px,
          #2ed392 4px,
          transparent 4px
      ),
      linear-gradient(
          transparent 2px,
          #d8dce9 2px,
          #d8dce9 4px,
          transparent 4px
      );
    background-size: 0% 6px, 100% 6px;
    background-position: 0 bottom, 0 bottom;
    transition: background-size 0.3s ease-in-out;
    background-repeat: no-repeat;
    padding-bottom: 4px;
    border-bottom: 6px solid transparent;
}
a.fancy:hover {
    background-size: 100% 6px;
}
@supports (-ms-ime-align:auto) {
    a.fancy, a.fancy:visited {
        background-image:
            linear-gradient(#2ed392, #2ed392),
            linear-gradient(#d8dce9, #d8dce9);
        background-size: 0% 2px, 100% 2px;
        padding-bottom: 2px;
    }
    a.fancy:hover {
        background-size: 100% 2px;
    }
}

/* Only border as underline, animated*/
a.just-border, a.just-border:visited {
    text-decoration: none;
    border-bottom: 2px solid #d8dce9;
    transition: border-color 0.3s;
}
a.just-border:hover {
    border-bottom: 2px solid #2ed392;
}

/* Regular normal old school link */
a.old-school, a.old-school:visited {
    text-decoration: none;
}
a.old-school:hover {
    text-decoration: underline;
}

/* Buggy approach*/
a.buggy, a.buggy:visited {
    text-decoration: none;
    position: relative;
    border-bottom: 2px solid #d8dce9;
}
a.buggy:before {
    content: "";
    height: 100%;
    position: absolute;
    border-bottom: 2px solid #2ed392;
    margin-top: 2px;
    left: 0;
    right: 100%;
    transition: all 0.3s;
}
a.buggy:hover:before {
    right: 0;
}

/* Cosmetics of the example only */
a:not(.old-school) {
    color: #2d305f;
}
a, p {
    font-size: 21px;
    line-height: 1.4;
}
p {
    color: #333346;
    max-width: 300px;
}

.row {
    display: flex;
}
.column {
    flex: 50%;
    margin-right: 10px;
    margin-bottom: 0;
}
@media only screen and (max-width: 640px) {
    .row {
      display: block;
    }
}
body{
  margin: 20px;
}
            
          
!
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.

Console