Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div>
  <p>
    <span class="label">Challenge ::</span> 
    Recreate Android/Jellybean link loading animation with pure CSS.
  </p>
  <p>
    <span class="label">Reference/Example ::</span>
    <a class="open-profile" href="https://codepen.io/dragontheory/pen/JjorrKL">
      https://codepen.io/dragontheory/pen/JjorrKL
    </a>
  </p>
  <p>
    <span class="label">Description ::</span> 
    Three stagarred animated "holes" or knockouts in link underline.
  </p>
  <p>
    <span class="label">Requirements ::</span>
    <ul>
      <li>Three stagarred animations on one HTML element (anchor tag)</li>
      <li>Each animated element is 6px width 1px height</li>
      <li>No extra markup (just the anchor tag)</li>
      <li>Must work with multiple lines (wrapping text)</li>
      <li>Pure CSS (no JS)</li>
      <li>Future proofed - Does not otherwise affect or limit anchor tag or link text string from other/future manipulation</li>
      <li>No absolute or static positioning</li>
      <li>"Hole" matches anchor element background color</li>
      <li>Cross/backward broswer compatible with FF, Chrome, Sufari, Edge, (IE11?)</li>
      <li>Responsive</li>
      <li>Performant</li>
    </ul>
  </p>
  <p>
    <span class="label">Single line test :: </span>
    <a href="#" class="open-profile">This is a link on a single line</a>.
  </p> 
  <div style="width: 300px;">
    <p>
      <span class="label">Multi line test :: </span>
      <a href="#" class="open-profile">This is a link that wrapps to a second line</a>.</p>
  </div>
<p>
  <span class="label">Links ::</span>
  <a href="https://css-tricks.com/css-techniques-and-effects-for-knockout-text/">https://css-tricks.com/css-techniques-and-effects-for-knockout-text</a>
</p>
</div>
              
            
!

CSS

              
                html,
body {
  background-color: #1d1e22;
  font-family: Calibri;
  color: #fff;
}

.label {color: #999;}

a {
  color: #2e9cd3;
  background: 
    /* knock-out */
    linear-gradient(#FFFFFF, #FFFFFF) left bottom / 6px 1px no-repeat;
    /* solid line 
    linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;*/
  -webkit-animation: break01 2s infinite, break02 2s 0.5s infinite, break03 2s 1s infinite;
          animation: break01 2s infinite, break02 2s 0.5s infinite, break03 2s 1s infinite;
  -webkit-transition: background 250ms ease;
          transition: background 250ms ease;
}
@-webkit-keyframes break01 {
  from {background-position: left bottom;}
  to {background-position: right bottom;}
}
@keyframes break01 {
  from {background-position: left bottom;}
  to {background-position: right bottom;}
}
@-webkit-keyframes break02 {
  from {background-position: left bottom;}
  to {background-position: right bottom;}
}
@keyframes break02 {
  from {background-position: left bottom;}
  to {background-position: right bottom;}
}
@-webkit-keyframes break03 {
  from {background-position: left bottom;}
  to {background-position: right bottom;}
}
@keyframes break03 {
  from {background-position: left bottom;}
  to {background-position: right bottom;}
}
              
            
!

JS

              
                // no JS
              
            
!
999px

Console