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

              
                <section>
  <h1>Loading Button</h1>
  <button class="button-pulse">
    <span>Loading</span>
   </button>
</section>

<a href="https://www.studioalex.dev/" target="_blank" class="studioalex-logo">
  <div class="studioalex">
    <svg width="0" height="0">
      <defs>
        <clipPath id="alex-clippath" clipPathUnits="objectBoundingBox">
          <path transform="scale(0.00252525, 0.00245098)" d="M196.538 5.51918C195.668 3.49358 193.154 3.49362 192.478 5.51918C191.801 7.54474 138.333 139.883 138.333 139.883L143.748 142.584L159.991 102.747L273.694 394.432H230.379V399.833H391.458V394.432H352.204C352.204 394.432 197.409 7.54478 196.538 5.51918Z" fill="white" stroke="white" stroke-width="8" />
          <path transform="scale(0.00252525, 0.00245098)" d="M187.292 240.836V235.435C26.6051 211.128 78.5917 390.053 5 396.129C5 399.505 5.00161 398.155 5 401.531C165.687 427.863 119.101 234.76 187.292 240.836Z" fill="white" stroke="white" stroke-width="8" />
        </clipPath>
      </defs>
    </svg>
  </div>
</a>
              
            
!

CSS

              
                @use postcss-nested;
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap');

:root {
  --pulse-color: hsl(187 97.5% 69.2%);
  --body-background-color: hsl(201 37.7% 12%);
}

html,
body {
  height: 100%;
}

body {
  display: grid;
  justify-content: center;
  align-content: center;
  background-color: #0f222b;
  padding: 20pt;
  box-sizing: border-box;
}

* {
  padding: 0;
  margin: 0;
}

section {
  text-align: center;
}

h1 {
  margin: 0 0 6rem 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 38px;
  color: white;
}



.button-pulse {
  --btn-border-radius: 6pt;
  position: relative;
  min-height: 30pt;
  padding: 0.25em 1.25em;
  font-family: 'Open Sans', sans-serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.15pt;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  user-select: none;
  outline: 0 solid transparent;
  border-radius: var(--btn-border-radius);
  border: 1pt solid var(--pulse-color);
  background-color: var(--pulse-color);
  
  &::before {
    position: absolute;
    content: "";
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    outline: 2pt solid var(--pulse-color);
    border-radius: var(--btn-border-radius);
    outline-offset: 2pt;
    outline-width: 2pt;
    animation: pluseButton 0.9s ease-out infinite;
  }
}

@keyframes pluseButton {
  from {
    outline-offset: 2pt;
    opacity: 1;
  }
  to {
    outline-offset: 10pt;
    opacity: 0;
    outline-width: 10pt;
  }
}

/* ---------- logo --------*/
.studioalex {
  display: inline-block;
  background-image: linear-gradient(45deg, rgb(246,46,36), rgb(255,133,27), rgb(255,221,0), rgb(46,204,64), rgb(0,116,217), rgb(176,13,201));
  background-size: 800% 800%;
  clip-path: url(#alex-clippath);
  height:30px;
  width: 30px;
  isolation: isolate;
  animation: rainbow 15s ease alternate infinite;
  
  &-logo {
    position: fixed;
    padding: 5px 5px 10px 8px;
    top: 20px;
    left: 20px;
    background-color: hsl(201 37.7% 22%);
    border-radius: 50%;
    
    &:hover {
      background-color: var(--pulse-color);
    }
  }
}

@keyframes rainbow {
  0% {
    background-position: 1% 80%;
  }
  50% {
    background-position: 99% 20%;
  }
  100% {
    background-position: 1% 80%;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console