cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

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
Loading ..................

Console