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.

            
              <ul class="charts">
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
</ul>
<div class="blocker"></div>
<div class="texter">Side text</div>
<div class="values">
  <span>70%</span>
  <span>40%</span>
  <span>80%</span>
  <span>60%</span>
  <span>10%</span>
  <span>85%</span>
</div>
<div class="values2">
<span>50%</span>
<span>90%</span>
  <span>50%</span>
  <span>55%</span>
  <span>40%</span>
  <span>30%</span>
</div>
<div class="values3">
<span>95%</span>
<span>66%</span>
</div>
<a href="#" class="c1">click me</a>
<a href="#" class="c2">click me2</a>
<a href="#" class="c3">click me3</a>
            
          
!
            
              a {
 background-color: #ccc;
 padding: 5px;
  text-decoration: none;
  margin: 10px;
}
.selected {
  background-color: #ff0000;
}
ul{
  list-style: none;
  position: relative;
  height: 150px;
}
.charts li {
  background-color:#ff0000;
  width:50px;
  height: 0px;
  bottom: 0;
  position: absolute;
  -webkit-transition: height .5s ease;
}


li.d0 {
  height: 70px;
  left: 0;
}
li.d1 {
  height: 40px;
  left: 50px;
  background-color: #A9AA8B;
}
li.d2 {
  height: 80px;
  left: 140px;
}
li.d3 {
  height: 60px;
  left: 190px;
  background-color: rgba(169, 170, 139, 1.0);
}
li.d4 {
  height: 10px;
  left: 280px;
}
li.d5 {
  height: 85px;
  left: 330px;
  background-color: rgba(169, 170, 139, 1.0);
}

li.d0a {
  height: 50px;
}

li.d1a {
  height: 90px;
}
li.d2a {
  height: 50px;
}
li.d3a {
  height: 55px;
}
li.d4a {
  height: 40px;
}
li.d5a {
  height: 30px;
}
li.d0b {
  height: 95px;
}
li.d1b {
  height: 66px;
}
li.d2b, li.d3b, li.d4b, li.d5b {
  height: 0px;
}
.values, .values2, .values3 {
  display: none;
}
.values span, .values2 span, .values3 span {
  position: absolute;
  color: #EF8B2E;
}
.values span:first-child {
  top: 70px;
}
.values span:nth-child(2) {
  top: 100px;
  left: 70px;
}
.values span:nth-child(3) {
  top: 60px;
  left: 160px;
}
.values span:nth-child(4) {
  top: 80px;
  left: 210px;
}
.values span:nth-child(5) {
  top: 140px;
  left: 290px;
}
.values span:last-child {
  top: 50px;
  left: 350px;
}
.values2 span:first-child {
  top: 100px;
}
.values2 span:nth-child(2) {
  top: 60px;
  left: 70px;
}
.values2 span:nth-child(3) {
  top: 100px;
  left: 160px;
}
.values2 span:nth-child(4) {
  top: 80px;
  left: 210px;
}
.values2 span:nth-child(5) {
  top: 100px;
  left: 290px;
}
.values2 span:last-child {
  top: 120px;
  left: 350px;
}
.values3 span:first-child {
  top: 50px;
}
.values3 span:nth-child(2) {
  top: 80px;
  left: 70px;
}
.blocker, .texter {
  display: none;
}
.blocker {
  background-color: #fff;
  width: 250px;
  height: 150px;
  position: absolute;
  top: 20px;
  left: 140px; 
}
.texter {
  position:absolute;
  top: 90px;
  left: 150px;
}
            
          
!
            
              var hideBlocker = function(){
  $('.blocker, .texter').hide();
};
var isMobile = navigator.platform == 'iPhone';
// initial chart
$('.charts li').attr('class', function(num){
    $(this).addClass( 'd' + num);
    $('.values').delay(400).fadeIn();
  });

// chart 2
$('.c2').on(isMobile ? 'touchstart' : 'click', function(){
  $(this).addClass('selected');
  $('.c1, .c3').removeClass('selected');
  $('.charts li').attr('class', function(num){
      $(this).addClass( 'd' + num + 'a').removeClass('d' + num + 'b');
  });
    $('.values2').delay(400).fadeIn();
    $('.values, .values3').hide();
  hideBlocker();
});
// chart 1
$('.c1').on(isMobile ? 'touchstart' : 'click', function(){
  $(this).addClass('selected');
  $('.c2, .c3').removeClass('selected');
  $('.charts li').attr('class', function(num){
      $(this).removeClass('d' + num + 'a').removeClass('d' + num + 'b');
  });
    $('.values').delay(400).fadeIn();
    $('.values2, .values3').hide();
  hideBlocker();
});
// chart 3
$('.c3').on(isMobile ? 'touchstart' : 'click', function(){
  $(this).addClass('selected');
  $('.c1, .c2').removeClass('selected');
  $('.charts li').attr('class', function(num){
      $(this).addClass( 'd' + num + 'b');
  });
  $('.values3').delay(400).fadeIn();
  $('.values, .values2').hide();
  $('.blocker').show();
  $('.texter').fadeIn();
});

            
          
!
999px
Loading ..................

Console