Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

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 class="nash">
  <div class="exchange">
    <div class="transfer">
      <span class="transfer__status">
        <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="check" class="transfer__icon transfer__icon--complete svg-inline--fa fa-check fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"></path></svg>
        <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="circle-notch" class="transfer__icon svg-inline--fa fa-circle-notch fa-w-16 fa-spin fa-fw " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M288 39.056v16.659c0 10.804 7.281 20.159 17.686 23.066C383.204 100.434 440 171.518 440 256c0 101.689-82.295 184-184 184-101.689 0-184-82.295-184-184 0-84.47 56.786-155.564 134.312-177.219C216.719 75.874 224 66.517 224 55.712V39.064c0-15.709-14.834-27.153-30.046-23.234C86.603 43.482 7.394 141.206 8.003 257.332c.72 137.052 111.477 246.956 248.531 246.667C393.255 503.711 504 392.788 504 256c0-115.633-79.14-212.779-186.211-240.236C302.678 11.889 288 23.456 288 39.056z"></path></svg>
      </span>
      <span class="transfer__name">Transfer</span>
      <img class="transfer__token" src="https://i.imgur.com/d2SEf9t.png" /> 
    </div>
  </div>
</div>
              
            
!

CSS

              
                $bg: #efefef;
$grey: #f2f6ff;
$blue: #0052f3;
$white: #ffffff;

@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

body {
  background: $bg;
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
}

.nash {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.exchange {
  position: relative;
  background-image: url('https://i.imgur.com/rsikgC9.jpg');
  width: 624px;
  height: 118px;
}

.transfer {
  position: absolute;
  right: 268px;
  top: 11px;
  background: $grey;
  padding: 6px 10px;
  border-radius: 100px;
  color: $blue;
  display: flex;
  align-items: center;
  transform: scale(0.7);
  opacity: 0;
  transition: background 250ms ease, color 250ms ease, transform 250ms cubic-bezier(0.25, 0.1, 0.57, 1.96), opacity 250ms ease;
  
  &--visible {
    transform: scale(1);
    opacity: 1;
  }
  
  &--complete {
    color: $white;
    background: $blue;
    animation: pulse 2s infinite;
  }
  
  &--pulse-off {
    animation: none;
  }
  
  &__status {
    position: relative;
    width: 10px;
    height: 10px;
  }
  
  &__icon {
    width: 100%;
    position: absolute;
    transition: opacity 250ms ease;
    animation: rotate 3s linear infinite;
    
    .transfer--complete & {
      opacity: 0;
    }
    
    &--complete {
      opacity: 0;
      animation: none;
      
      .transfer--complete & {
        opacity: 1;
      }
    }
  }
  
  &__name {
    padding: 0 6px;
  }
  
  &__token {
    height: 15px;
    width: auto;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba($blue,0.8);
  }
  70% {
    box-shadow: 0 0 0 7px rgba($blue,0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba($blue,0);
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
              
            
!

JS

              
                //Show transfer after 2 sec
setTimeout( () => document.querySelector(".transfer").classList.add('transfer--visible'), 2000)

//Show the complete transfer after 5 sec
setTimeout( () => document.querySelector(".transfer").classList.add('transfer--complete'), 7000)

//Stop pulse
setTimeout( () => document.querySelector(".transfer").classList.add('transfer--pulse-off'), 15000)

//Hide the transfer
setTimeout( () => document.querySelector(".transfer").classList.remove('transfer--visible'), 18000)
              
            
!
999px

Console