cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              <div class="exp">
  <div class="profile-wrap">
    <span class="head"></span>
    <span class="body"></span>
  </div>
</div>
            
          
!
            
              /* variables */

$blue: #1790b5;
$white: #fff;

/* styling */

html {
  height: 100%; // for styling only
}

body {
  background-color: $blue; // for styling only
  height: 100%; // for styling only
  font-family: 'Open Sans', sans-serif;
}

* {
  box-sizing: border-box;
}

.exp {
  width: 100%; // for example positioning purposes
  height: 100%; // for example positioning purposes
  position: relatve;
  
  .profile-wrap {
    width: 100px; // Container width,adjust to your needs
    height: 100px; // Container width,adjust to your needs
    box-sizing: content-box; // important as we want the border to animate outwards 
    border: 4px solid $white;
    background-color: $blue;
    border-radius: 50%;
    top: 50%; // We'll be centering with stransform so that the coordinates are not affected buy the animation
    left: 50%; // We'll be centering with stransform so that the coordinates are not affected buy the animation
    transform: translate(-50%, -50%); // We'll be centering with stransform so that the coordinates are not affected buy the animation
    position: absolute;
    animation: border-size 1.6s ease-out infinite; 
    
    &:after { // The outer ring is created using a pseudi
      content: "";
      display: block;
      width: 100px; // Container width,adjust to your needs
      height: 100px; // Container width,adjust to your needs
      
      border: 4px solid $white;
      border-radius: 50%;
      top: -4px; // We need to account for the border size when positioning
      left: -4px ; // We need to account for the border size when positioning
      transform-origin: 50%;
      position: absolute;
      animation: signal 1.6s ease-out infinite;
    }
  }
}

.head {
  width: 18px;
  height: 20px;
  border: 4px solid $white;
  background-color: $white;
  display: block;
  border-radius: 9px;
  position: absolute;
  top: 23px;
  left: 50%;
  margin-left: -9px;
}

.body {
  width: 32px;
  height: 30px;
  border: 4px solid $white;
  background-color: $white;
  display: block;
  border-radius: 50% 50% 8px 8px;
  position: absolute;
  top: 48px;
  left: 50%;
  margin-left: -16px;
}

// The keyframe position needs some experimenting to get the desired effect

@keyframes border-size {
    0% {
        border-width: 4px;
      }

    15% {
        border-width: 10px
      }

    100% {
        border-width: 4px
    }
}

@keyframes signal {
    0% {
        transform: scale(1);
        opacity: 1;
      }

    80% {
        transform: scale(1.4);
        opacity: 0;
      }

    100% {
        transform: scale(1);
      opacity: 0;
    }
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console