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

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="infograph">
  
  <div class="round-bar">
    <div class="section section--green"><span>20%</span></div>
    <div class="section section--yellow"><span>30%</span></div>
    <div class="section"><span>50%</span></div>
  </div>
  
  <div class="tooltips">
    
     <div class="tooltip tooltip--first">
       <div class="tooltip__line"></div>
       <div class="tooltip__content">
          <h3 class="tooltip__title">Inspiring</h3>
          <div class="tooltip__text">Our purpose is to enhance the lives of young people through experiences that inspire. We help to define and target their learning objectives to maximise the impact and value of their experience.
         <div class="tooltip__actions">
           <a href="" class="ion-android-favorite-outline"></a> 
           <a href="" class="ion-android-share-alt"></a>
         </div>
         </div>
       </div>
     </div>
    
     <div class="tooltip tooltip--second">
       <div class="tooltip__line"></div>
       <div class="tooltip__content">
          <h3 class="tooltip__title">Practical</h3>
          <div class="tooltip__text">Nam molestie nec tortor. Donec placerat leo sit amet velit. Vestibulum id justo ut vitae massa. Proin in dolor mauris consequat aliquam.
         <div class="tooltip__actions">
           <a href="" class="ion-android-favorite-outline"></a> 
           <a href="" class="ion-android-share-alt"></a>
         </div>
         </div>
       </div>
     </div>
    
     <div class="tooltip tooltip--third">
       <div class="tooltip__line"></div>
       <div class="tooltip__content">
          <h3 class="tooltip__title">Helpful</h3>
          <div class="tooltip__text">One way to approach course design is to start from the learning objectives, then move on to the other two components, and revisit the cycle iteratively as needed.
         
         <div class="tooltip__actions">
           <a href="" class="ion-android-favorite-outline"></a> 
           <a href="" class="ion-android-share-alt"></a>
         </div></div>
       </div>
     </div>
    
    
        <div class="tooltip tooltip--fourth">
       <div class="tooltip__line"></div>
       <div class="tooltip__content">
          <h3 class="tooltip__title">Justice</h3>
          <div class="tooltip__text">Mauris sed libero. Suspendisse facilisis nulla in lacinia laoreet, lorem velit accumsan velit vel mattis libero nisl et sem. Proin interdum maecenas massa turpis sagittis in, interdum non lobortis vitae massa.
         
         <div class="tooltip__actions">
           <a href="" class="ion-android-favorite-outline"></a> 
           <a href="" class="ion-android-share-alt"></a>
         </div></div>
       </div>
     </div>
    
     <div class="tooltip tooltip--fifth">
       <div class="tooltip__line"></div>
       <div class="tooltip__content">
          <h3 class="tooltip__title">Transparency</h3>
          <div class="tooltip__text">Nam molestie nec tortor. Donec placerat leo sit amet velit. Vestibulum id justo ut vitae massa. Proin in dolor mauris consequat aliquam.
         <div class="tooltip__actions">
           <a href="" class="ion-android-favorite-outline"></a> 
           <a href="" class="ion-android-share-alt"></a>
         </div></div>
       </div>
     </div>
    
     <div class="tooltip tooltip--sixth">
       <div class="tooltip__line"></div>
       <div class="tooltip__content">
          <h3 class="tooltip__title">Sharing</h3>
          <div class="tooltip__text">Vivamus placerat lacus vel vehicula scelerisque, dui enim adipiscing lacus sit amet sagittis, libero enim vitae mi. In neque magna posuere, euismod ac tincidunt tempor est.
         
         <div class="tooltip__actions">
           <a href="" class="ion-android-favorite-outline"></a> 
           <a href="" class="ion-android-share-alt"></a>
         </div></div>
       </div>
     </div>
    

    
  </div>
  
  <div class="clearfix"></div>
</div>
              
            
!

CSS

              
                $purple: #BEC3E6;
$yellow: #FFF5AF;
$green: #CDECE4;
$dark: #210F00;
$dark-grey: #7E878B;
$grey: lighten(#7E878B, 27%);

$tooltip-line-border-width: 2px;
$tooltip-text-width: 250px;
$tooltip-circle-width: 16px;

body {
  font-family: 'Rubik', sans-serif;
  padding: 0;
  margin: 0;
}

// Container
.infograph {
  margin: 20px auto;
  max-width: 1200px;
}

// Round bar
.round-bar {
  
  float: left;
  width: 210px;
  height: 900px;
  color: $dark;
  text-align: center;
  font-size: 45px;
  border-radius: 100px;
  overflow: hidden;
  font-weight: 300;
 // box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);

  .section {
    background: #BEC3E6;
    align-self: stretch;
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 100;
    span {
      transition: 0.15s ease;
    }
    &:hover span{
     transform: scale(1.2);
    }
    
  }
  .section--green {
    background: $green;
    height: 20%;
  }
  
  .section--yellow {
    height: 30%;
    background: $yellow;
  }
  
}

// Tooltips
.tooltips {
  float:left;
  margin-left: 30px;
  background: #eee;
  .tooltip__line {
    border-width: $tooltip-line-border-width $tooltip-line-border-width 0 0;
    border-style: solid;
    border-color: $grey;
    position: relative;
    transition: border 0.4s ease;
    &:before {
      left: -$tooltip-circle-width;
      top: -(($tooltip-circle-width/2) + ($tooltip-line-border-width*1.5));
    }
    
     &:after {
      right: -(($tooltip-circle-width/2) + ($tooltip-line-border-width*1.5));
      bottom: -$tooltip-circle-width
      
    }
    &:after, &:before {
      display: block;
      content: '';
      width: $tooltip-circle-width;
      height: $tooltip-circle-width;
      position: absolute;
      border-radius: 50%;
      border: $tooltip-line-border-width solid $grey;
      background: #FFF;
    }
  }
  
  .tooltip {
    position: absolute;


    &:hover, &:active, &:focus {
      .tooltip__text {
        opacity: 1;
        transform: scale(1);
      }
      .tooltip__title:after {
        transform: scaleX(1);
      }
      .tooltip__line {
        border-color: $dark;
        border-style: dashed;
       
        &:after, &:before {
          border-style: dashed;
          animation: round-dash 0.5s linear 0s infinite;
        }
      }
    }
    
  }
  .tooltip__content {
    max-width: $tooltip-text-width;
  }
  .tooltip__title {
    padding: 0;
    margin: 0 0 20px;
    font-size: 1.7em;
    text-transform: uppercase;
    font-weight: 400;
    width: $tooltip-text-width;
    text-align: center;
    display: inline-block;
    position: relative;
    &:after {
      display: display-block;
      content: '';
      height: $tooltip-line-border-width;
      width: 80%;
      background: $dark;
      position: absolute;
      bottom: -8px;
      left: 10%;
      transform: scaleX(0);
      transition: transform 0.15s ease-out;
      transform-origin: 50% 50%;
    }
  }
  
  .tooltip__text {
    opacity: 0;
    transform: scale(0);
    transition: 0.15s ease-out;
    transform-origin: 50% 0px;
    text-align: center;
    font-size: 0.8em;
    color: $dark-grey;
  }
}
.tooltip__actions {
  padding: 5px;
  a {
    font-size: 1.4em;
    margin: 0 5px;
    display: inline-block;
    color: $dark;
    border-radius: 50%;
    transition: 0.2s ease;
    width: 40px;
    height: 40px;
    line-height: 42px;
    &:hover {
      background: #f2f2f2;
    }
  }
}

.clearfix {
  clear: both;
  display: table;
}


@mixin tooltip($class, $top, $width, $height, $radius){
  .tooltip--#{$class} {
     top: $top;
    .tooltip__line {
      width: $width;
      height: $height;
      border-top-right-radius: 5px; // $radius
    }
    
    .tooltip__content {
      padding: (25px) 0 0 ($width - ($tooltip-text-width / 2));
    }
  }
}

@include tooltip(first, 110px, 800px, 140px, 200px);
@include tooltip(second, 140px, 500px, 110px, 120px);
@include tooltip(third, 170px, 200px, 80px, 70px);
@include tooltip(fourth, 495px, 800px, 140px, 200px);
@include tooltip(fifth, 525px, 500px, 110px, 120px);
@include tooltip(sixth, 555px, 200px, 80px, 70px);

@keyframes scaleY-in {
    from {transform: scaleY(0);}
    to { transform: scaleY(1);}
}
@keyframes scaleX-in {
    from {transform: scaleX(0); opacity: 0;}
    to { transform: scaleX(1); opacity: 1; }
}


@keyframes fade-in {
    from {opacity: 0; }
    to { opacity: 1; }
}

@keyframes round-dash {
     0% { border-color: $grey $grey $grey $dark; }
    25% { border-color:   $dark $grey $grey $grey; }
    50% { border-color:  $grey $dark $grey $grey; }
    75% { border-color:  $grey $grey $dark $grey; }
    100% { border-color: $grey $grey $grey $dark; }
}



// Animations 

.round-bar {
  transform: scaleY(0);
  animation: scaleY-in 0.55s cubic-bezier(.87,-.41,.19,1.44) 0.75s;
  transform-origin: 50% 0;
  animation-fill-mode: forwards;
}

.section span{
  opacity: 0;
  animation: fade-in 0.7s ease-out 1.5s;
  animation-fill-mode: forwards;
}

.tooltip {
  transform: scaleX(0);
  opacity: 0;
  animation: scaleX-in 0.3s ease 2s;
  transform-origin: -20px 50%;
  animation-fill-mode: forwards;
  display: block;
  
  $button-count: 12;
  @for $i from 1 through $button-count{
   &:nth-child(#{$i}) { 
     animation-delay: ($i)*250ms + 2s;
   }
  }
  
}


              
            
!

JS

              
                
              
            
!
999px

Console