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.

            
              <section>

  <div class="wrap">
    <div class="iwrap">
      <input class="range-slider" type="range" value="0" min="0" max="100"/>
      <span class="dot0"></span>
      <span class="dots"></span>
      <span class="dots"></span>
      <span class="dots"></span>
      <span class="dots"></span>
      <span class="dots"></span>
      <span class="dots"></span>
      <span class="dots"></span>
      <span class="dots"></span>
      <span class="dots"></span>
      <span class="dots"></span>
    </div>
  </div>

</section>

<section class="step2">
  <div class="wrap">
    <h1>What a genius, you did it !</h1>
  </div>
</section>

<div class="megadot"></div>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Montserrat:400,700');

* {
  margin:0;
  padding:0;
  outline:none;
  list-style:none;
  text-decoration:none;
  box-sizing:border-box;
  color:#111;
  background: transparent;
  border:none;
}

body {
  background: #FFF;
  font-family: 'Montserrat', sans-serif;
  overflow: hidden;
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

section {
  height: 100vh;
}

.wrap {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  -webkit-transform: translateY(-50%);
  text-align: center;
}

.iwrap {
  position: relative;
  display: inline-block;
}
.dots {
  background: #ccc;
  border-radius:50%;
  height: 4px;width: 4px;
  position: absolute;
  left: 0;top: 0;bottom: 0;
  margin: auto;
}
.dot0 {
  background:#ccc;
  border-radius:50%;
  height: 2px;width: 2px;
  position: absolute;
  left: 0;top: 0;bottom: 0;
  margin: auto;
}

input[type=range] {
  -webkit-appearance: none;
  width: 250px;
  height: 30px;
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 2px;
  cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
  height: 30px;
  width: 30px;
  border-radius: 50%;
  background: tomato;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -14px;
  position: relative;
  z-index: 2;
}

.dots.active {
  background: tomato;
}


.megadot {
  background: tomato;
  height: 300px;
  width: 300px;
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  transition: 1.5s all cubic-bezier(0.19, 1, 0.22, 1);
}

.megadot.active {
  transform: scale(10);
}

.step2 {
  position: absolute;
  width: 100%;
  top: 0;left: 0;
  z-index: 3;
  display: none;
}

.step2 h1 {
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.3s all ease-out 0.3s;
}

.step2.active h1 {
  transform: translateY(0);
  opacity: 1;
}
            
          
!
            
              $(document).ready(function(){
  dotPos();
  rangeSlider();
  megaDotPos();
  $('.range-slider').mousemove(function(){
    showPop();
  });
});

$(window).resize(function(){
  megaDotPos();
});

function showPop() {
  if ($('.range-slider').val() == 100){
    $('.megadot').addClass('active');
    $('.step2').fadeIn().addClass('active');
  }
}

function dotPos() {
  var totalW = $('.iwrap').width();
  var totalL = $('.dots').length;
  var dotsW = totalW / totalL;
  var dotsV = 100 / totalL;
  var i = 0;
  $('.dots').each(function(){
    i++;
    $(this).css("left", ((dotsW * i) - 4) +"px");
    $(this).attr("data-value", (dotsV * i));
  });
}

function rangeSlider() {
  $('.range-slider').mousemove(function(){
    var slideV = $('.range-slider').val();
    this.setAttribute('value', this.value);
    $('.dots').each(function(i){
      // console.log(slideV, $(this).attr("data-value"));
      if (slideV >= Number($(this).attr("data-value"))) {
        $(this).addClass('active');
      } else {
        $(this).removeClass('active');
      }
    });
  });
}

function megaDotPos() {
  var sTop = $('.range-slider').offset().top;
  var sLeft = $('.range-slider').offset().left;
  var sWidth = $('.range-slider').width();

  // console.log(sTop, sLeft, sWidth);

  $('.megadot').css({
    "left": sLeft + sWidth - 150,
    "top": sTop - 150
  });
}
            
          
!
999px
Loading ..................

Console