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 id="profile">
  <img src="" alt="Cat">

  <ul class="menu">
    <li><a href="#" title="Home">Home</a></li>
    <li><a href="#" title="About">About</a></li>
    <li><a href="#" title="Work">Work</a></li>
    <li><a href="#" title="Blog">Blog</a></li>
    <li><a href="#" title="Contact">Contact</a></li>

<div class="wrapper">
<h2>Hello, I'm <a href="" title="Katherine Kato">Katherine Kato</a>!</h2>
<p>Lorem ipsum dolor sit amet, <a href="#">consectetur</a> adipisicing elit. Est <a href="#">explicabo</a> unde natus necessitatibus esse obcaecati distinctio, aut itaque, qui vitae!</p>
<p>Aspernatur sapiente quae sint <a href="#">soluta</a> modi, atque praesentium laborum pariatur earum <a href="#">quaerat</a> cupiditate consequuntur facilis ullam dignissimos, aperiam quam veniam.</p>
<p>Cum ipsam quod, incidunt sit ex <a href="#">tempore</a> placeat maxime <a href="#">corrupti</a> possimus <a href="#">veritatis</a> ipsum fugit recusandae est doloremque? Hic, <a href="#">quibusdam</a>, nulla.</p>
<p>Esse quibusdam, ad, ducimus cupiditate <a href="#">nulla</a>, quae magni odit <a href="#">totam</a> ut consequatur eveniet sunt quam provident sapiente dicta neque quod.</p>
<p>Aliquam <a href="#">dicta</a> sequi culpa fugiat <a href="#">consequuntur</a> pariatur optio ad minima, maxime <a href="#">odio</a>, distinctio magni impedit tempore enim repellendus <a href="#">repudiandae</a> quas!</p>
              @import url('');

html {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;

*, *:before, *:after {
  -webkit-box-sizing: inherit;
  -moz-box-sizing: inherit;
  box-sizing: inherit;

body {
  min-height: 100vh;
  margin: 0; /* Important! */
  font-family: 'Lato', serif;
  color: #7d7d7d;

.wrapper {
  margin: 0 auto;
  max-width: 650px;
  font-size: 20px;
  line-height: 2;
  position: relative;

h2 {
  font-family: 'Lato', sans-serif;
  color: #272727;

a {
  text-decoration: none;
  color: #272727;
  background: rgba(240, 233, 241, 0.4);

.highlight {
  transition: all 0.2s;
  border-bottom: 2px solid #fff8a3;
  position: absolute;
  top: 0;
  background: #fff8a3;
  left: 0;
  z-index: -1;
  display: block;

.menu {
  padding: 0;
  display: flex;
  list-style: none;
  justify-content: center;
  margin: 40px 0 60px 0;

.menu a {
  display: inline-block;
  padding: 5px;
  margin: 0 20px;

#profile {
  margin: 40px 0;

img {
  margin: 0 auto;
  display: block;
  width: 125px;
  height: 125px;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%;
              const triggers = document.querySelectorAll('a');
const highlight = document.createElement('span');

function highlightLink() {
  const linkCoords = this.getBoundingClientRect();

  const coords = {
    width: linkCoords.width,
    height: linkCoords.height,
    top: + window.scrollY,
    left: linkCoords.left + window.scrollX
  }; = `${coords.width}px`; = `${coords.height}px`; = `translate(${coords.left}px, ${}px)`;

triggers.forEach(a => a.addEventListener('mouseenter', highlightLink));

// From
triggers.forEach(a => a.addEventListener('focus', highlightLink));
🕑 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.