Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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="wrap">
  <h1><strong> Facebook</strong></h1>
  <div class="countdown">
    <div class="bloc-time" data-init-value="0">
      <!--<span class="count-title">Likes</span>-->

      <div class="figure">
        <span id="first-char-top" class="top">0</span>
        <span id="first-char-top-back" class="top-back top-back-fb">0</span>
        <span id="first-char-bottom" class="bottom">0</span>
        <span id="first-char-bottom-back" class="bottom-back">1</span>
      </div>


      <div class="figure">
        <span id="second-char-top" class="top">0</span>
        <span id="second-char-top-back" class="top-back top-back-fb">0</span>
        <span id="second-char-bottom" class="bottom">0</span>
        <span id="second-char-bottom-back" class="bottom-back">1</span>
      </div>


      <div class="figure">
        <span id="third-char-top" class="top">0</span>
        <span id="third-char-top-back" class="top-back top-back-fb">0</span>
        <span id="third-char-bottom" class="bottom">0</span>
        <span id="third-char-bottom-back" class="bottom-back">1</span>
      </div>


      <div class="figure">
        <span id="four-char-top" class="top">0</span>
        <span id="four-char-top-back" class="top-back top-back-fb">0</span>
        <span id="four-char-bottom" class="bottom">0</span>
        <span id="four-char-bottom-back" class="bottom-back">1</span>
      </div>
      <div class="figure">
        <span><i class="fa fa-thumbs-up" style="font-size:50px;"></i></span>
      </div>
    </div>
  </div>
</div>
<div class="wrap">
  <h1><strong class="instagram_background"> Instagram</strong></h1>
  <div class="countdown">
    <div class="bloc-time sec" data-init-value="0">
      <!--<span class="count-title">Followers</span>-->


      <div class="figure">
        <span id="instagram-first-char-top" class="top whitebackground"><span class="instagram_background">0</span></span>
        <span id="instagram-first-char-top-back" class="top-back whitebackground"><span class="instagram_background">0</span></span>
        <span id="instagram-first-char-bottom" class="bottom whitebackground"><span class="instagram_background">0</span></span>
        <span id="instagram-first-char-bottom-back" class="bottom-back whitebackground"><span class="instagram_background">1</span></span>
      </div>


      <div class="figure">
        <span id="instagram-second-char-top" class="top whitebackground"><span class="instagram_background">0</span></span>
        <span id="instagram-second-char-top-back" class="top-back whitebackground"><span class="instagram_background">0</span></span>
        <span id="instagram-second-char-bottom" class="bottom whitebackground"><span class="instagram_background">0</span></span>
        <span id="instagram-second-char-bottom-back" class="bottom-back whitebackground"><span class="instagram_background">1</span></span>
      </div>


      <div class="figure">
        <span id="instagram-third-char-top" class="top whitebackground"><span class="instagram_background">0</span></span>
        <span id="instagram-third-char-top-back" class="top-back whitebackground"><span class="instagram_background">0</span></span>
        <span id="instagram-third-char-bottom" class="bottom whitebackground"><span class="instagram_background">0</span></span>
        <span id="instagram-third-char-bottom-back" class="bottom-back whitebackground"><span class="instagram_background">1</span></span>
      </div>


      <div class="figure">
        <span id="instagram-four-char-top" class="top whitebackground"><span class="instagram_background">0</span></span>
        <span id="instagram-four-char-top-back" class="top-back whitebackground"><span class="instagram_background">0</span></span>
        <span id="instagram-four-char-bottom" class="bottom whitebackground"><span class="instagram_background">0</span></span>
        <span id="instagram-four-char-bottom-back" class="bottom-back whitebackground"><span class="instagram_background">1</span></span>
      </div>
      
      <div class="figure">
        <span><i class="fa fa-instagram instagram_background" style="font-size:50px;"></i></span>
      </div>
    </div>
  </div>
</div>
<div class="container-button"><div class="button" id="getlikebutton" >START</div></div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Dosis:200,300,400,500,600,700,800');

body {
  font-family: 'Dosis';
}

.wrap {
  margin: auto;
  margin-bottom:50px;
}

h1 {
  margin-bottom: 10px;
  text-align: center;
  font: 300 2.25em "Dosis";
  text-transform: uppercase;
}

h1 strong {
  color: #3B579D;
}

.countdown {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  margin: 0 auto;
}
.countdown .bloc-time {
  text-align: center;
}

.countdown .figure {
  position: relative;
  float: left;
  height: 110px;
  width: 100px;
  margin-right: 10px;
  background-color: #fff;
  border-radius: 8px;
  -webkit-box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.2), inset 2px 4px 0 0 rgba(255, 255, 255, 0.08);
  box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.2), inset 2px 4px 0 0 rgba(255, 255, 255, 0.08);
}

@media only screen and (max-width: 600px) {
    .countdown .bloc-time  {
      transform: scale(0.7);
    }
    .countdown .figure {
      margin-right: 0;
      width:60px;
    }
}

.countdown .figure:last-child {
  margin-right: 0;
}
.countdown .figure > span {
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  font: normal 5.94em/107px "Dosis";
  font-weight: 700;
  color: #3B579D;
}
.countdown .figure .top {
  z-index: 3;
  background-color: #f7f7f7;
  -ms-transform-origin: 50% 100%;
      transform-origin: 50% 100%;
  -webkit-transform-origin: 50% 100%;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  -ms-transform: perspective(200px);
  -webkit-transform: perspective(200px);
  transform: perspective(200px);
}
.countdown .figure .bottom {
  z-index: 1;
  background-color: white;
}
.countdown .figure .bottom-back {
  z-index: 2;
  top: 0;
  height: 50%;
  overflow: hidden;
  background-color: #f7f7f7;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
.countdown .figure .top, .countdown .figure .top-back {
  height: 50%;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.countdown .figure .top-back {
  z-index: 1;
  bottom: 0;
  background-color: #fff;
  -webkit-transform-origin: 50% 0;
  -ms-transform-origin: 50% 0;
      transform-origin: 50% 0;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.top-back-fb {
  height:100%!important;
}

.countdown .figure .top-back span {
  position: absolute;
  top: -100%;
  left: 0;
  right: 0;
  margin: auto;
}

.animatetop {
  -webkit-animation : rotatetop 1s forwards;
          animation : rotatetop 1s forwards;
}

@-webkit-keyframes rotatetop {
  0%{
    -webkit-transform: rotateX(0deg);
            transform: rotateX(0deg);
  }
  50%{
    -webkit-transform: rotateX(180deg);
            transform: rotateX(180deg);
  }
  100%{
    -webkit-transform: rotateX(180deg);
            transform: rotateX(180deg);
  }
}

@keyframes rotatetop {
  0%{
    -webkit-transform: rotateX(0deg);
            transform: rotateX(0deg);
  }
  50%{
    -webkit-transform: rotateX(180deg);
            transform: rotateX(180deg);
  }
  100%{
    -webkit-transform: rotateX(180deg);
            transform: rotateX(180deg);
  }
}

.animatebottom {
  -webkit-animation : rotatebottom 1s forwards;
          animation : rotatebottom 1s forwards;
}

@-webkit-keyframes rotatebottom {
  0%{
    -webkit-transform: rotateX(90deg);
            transform: rotateX(90deg);
  }
  20%{
    -webkit-transform: rotateX(90deg);
            transform: rotateX(90deg);
  }
  30%{
    -webkit-transform: rotateX(0deg);
            transform: rotateX(0deg);
  }
  100%{
    -webkit-transform: rotateX(0deg);
            transform: rotateX(0deg);
  }
}

@keyframes rotatebottom {
  0%{
    -webkit-transform: rotateX(90deg);
            transform: rotateX(90deg);
  }
  20%{
    -webkit-transform: rotateX(90deg);
            transform: rotateX(90deg);
  }
  30%{
    -webkit-transform: rotateX(0deg);
            transform: rotateX(0deg);
  }
  100%{
    -webkit-transform: rotateX(0deg);
            transform: rotateX(0deg);
  }
}

.container-button {
  display:-webkit-box;
  display:-ms-flexbox;
  display:flex;
  -webkit-box-pack:center;
      -ms-flex-pack:center;
          justify-content:center;
  -webkit-box-align:center;
      -ms-flex-align:center;
          align-items:center;
}

.button {
  padding: 10px 40px;
  background-color: #3B579D;
  font-size:20px;
  font-weight: 500;
  color:white;
  border-radius: 25px;
  cursor:pointer;
}

.instagram_background {
  background: radial-gradient(circle farthest-corner at 35% 90%, #fec564, transparent 50%),
  radial-gradient(circle farthest-corner at 0 140%, #fec564, transparent 50%),
  radial-gradient(ellipse farthest-corner at 0 -25%, #5258cf, transparent 50%),
  radial-gradient(ellipse farthest-corner at 20% -50%, #5258cf, transparent 50%),
  radial-gradient(ellipse farthest-corner at 100% 0, #893dc2, transparent 50%),
  radial-gradient(ellipse farthest-corner at 60% -20%, #893dc2, transparent 50%),
  radial-gradient(ellipse farthest-corner at 100% 100%, #d9317a, transparent),
  -webkit-gradient(linear, left top, left bottom, from(#6559ca), color-stop(30%, #bc318f), color-stop(50%, #e33f5f), color-stop(70%, #f77638), to(#fec66d));
  background: -webkit-radial-gradient(35% 90%, circle farthest-corner, #fec564, transparent 50%),
  -webkit-radial-gradient(0 140%, circle farthest-corner, #fec564, transparent 50%),
  -webkit-radial-gradient(0 -25%, ellipse farthest-corner, #5258cf, transparent 50%),
  -webkit-radial-gradient(20% -50%, ellipse farthest-corner, #5258cf, transparent 50%),
  -webkit-radial-gradient(100% 0, ellipse farthest-corner, #893dc2, transparent 50%),
  -webkit-radial-gradient(60% -20%, ellipse farthest-corner, #893dc2, transparent 50%),
  -webkit-radial-gradient(100% 100%, ellipse farthest-corner, #d9317a, transparent),
  -webkit-linear-gradient(#6559ca, #bc318f 30%, #e33f5f 50%, #f77638 70%, #fec66d 100%);
  background: -o-radial-gradient(35% 90%, circle farthest-corner, #fec564, transparent 50%),
  -o-radial-gradient(0 140%, circle farthest-corner, #fec564, transparent 50%),
  -o-radial-gradient(0 -25%, ellipse farthest-corner, #5258cf, transparent 50%),
  -o-radial-gradient(20% -50%, ellipse farthest-corner, #5258cf, transparent 50%),
  -o-radial-gradient(100% 0, ellipse farthest-corner, #893dc2, transparent 50%),
  -o-radial-gradient(60% -20%, ellipse farthest-corner, #893dc2, transparent 50%),
  -o-radial-gradient(100% 100%, ellipse farthest-corner, #d9317a, transparent),
  -o-linear-gradient(#6559ca, #bc318f 30%, #e33f5f 50%, #f77638 70%, #fec66d 100%);
  background: radial-gradient(circle farthest-corner at 35% 90%, #fec564, transparent 50%),
  radial-gradient(circle farthest-corner at 0 140%, #fec564, transparent 50%),
  radial-gradient(ellipse farthest-corner at 0 -25%, #5258cf, transparent 50%),
  radial-gradient(ellipse farthest-corner at 20% -50%, #5258cf, transparent 50%),
  radial-gradient(ellipse farthest-corner at 100% 0, #893dc2, transparent 50%),
  radial-gradient(ellipse farthest-corner at 60% -20%, #893dc2, transparent 50%),
  radial-gradient(ellipse farthest-corner at 100% 100%, #d9317a, transparent),
  linear-gradient(#6559ca, #bc318f 30%, #e33f5f 50%, #f77638 70%, #fec66d 100%);
  color:white!important;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.whitebackground {
  background-color:white!important;
}
              
            
!

JS

              
                var first = 1;
var second = 4;
var third = 1;
var four = 3;

var instagram_first = 0;
var instagram_second = 7;
var instagram_third = 3;
var instagram_four = 2;

var cptfirst = 0;
var cptsecond = 0;
var cptthird = 0;
var cptfour = 0;

var instacptfirst = 0;
var instacptsecond = 0;
var instacptthird = 0;
var instacptfour = 0;
var actualiser = 0;

function myLoop () {
    actualiser = 0;
    setTimeout(function () {
        cptfirst++;
        if (cptfirst < parseInt(first)+1) {
            actualiser = 1;
            document.getElementById('first-char-top').classList.add('animatetop');
            document.getElementById('first-char-bottom').innerHTML = cptfirst;
            document.getElementById('first-char-bottom-back').innerHTML = cptfirst;
            document.getElementById('first-char-bottom').classList.add('animatebottom');
            setTimeout(function () {
                document.getElementById('first-char-top').classList.remove('animatetop');
                document.getElementById('first-char-bottom').innerHTML = cptfirst;
                document.getElementById('first-char-top').innerHTML = cptfirst;
                document.getElementById('first-char-top-back').innerHTML = cptfirst;
                document.getElementById('first-char-bottom').classList.remove('animatebottom');
            },250);
        }

        cptsecond++;
        if (cptsecond < parseInt(second)+1) {
            actualiser = 1;
            document.getElementById('second-char-top').classList.add('animatetop');
            document.getElementById('second-char-bottom').innerHTML = cptsecond;
            document.getElementById('second-char-bottom-back').innerHTML = cptsecond;
            document.getElementById('second-char-bottom').classList.add('animatebottom');
            setTimeout(function () {
                document.getElementById('second-char-top').classList.remove('animatetop');
                document.getElementById('second-char-bottom').innerHTML = cptsecond;
                document.getElementById('second-char-top').innerHTML = cptsecond;
                document.getElementById('second-char-top-back').innerHTML = cptsecond;
                document.getElementById('second-char-bottom').classList.remove('animatebottom');
            },250);
        }

        cptthird++;
        if (cptthird < parseInt(third)+1) {
            actualiser = 1;
            document.getElementById('third-char-top').classList.add('animatetop');
            document.getElementById('third-char-bottom').innerHTML = cptthird;
            document.getElementById('third-char-bottom-back').innerHTML = cptthird;
            document.getElementById('third-char-bottom').classList.add('animatebottom');
            setTimeout(function () {
                document.getElementById('third-char-top').classList.remove('animatetop');
                document.getElementById('third-char-bottom').innerHTML = cptthird;
                document.getElementById('third-char-top').innerHTML = cptthird;
                document.getElementById('third-char-top-back').innerHTML = cptthird;
                document.getElementById('third-char-bottom').classList.remove('animatebottom');
            },250);
        }

        cptfour++;
        if (cptfour < parseInt(four)+1) {
            actualiser = 1;
            document.getElementById('four-char-top').classList.add('animatetop');
            document.getElementById('four-char-bottom').innerHTML = cptfour;
            document.getElementById('four-char-bottom-back').innerHTML = cptfour;
            document.getElementById('four-char-bottom').classList.add('animatebottom');
            setTimeout(function () {
                document.getElementById('four-char-top').classList.remove('animatetop');
                document.getElementById('four-char-bottom').innerHTML = cptfour;
                document.getElementById('four-char-top').innerHTML = cptfour;
                document.getElementById('four-char-top-back').innerHTML = cptfour;
                document.getElementById('four-char-bottom').classList.remove('animatebottom');
            },250);
        }

        instacptfirst++;
        if (cptfirst < parseInt(instagram_first)+1) {
            actualiser = 1;
            document.getElementById('instagram-first-char-top').classList.add('animatetop');
            document.getElementById('instagram-first-char-bottom').innerHTML = '<span class="instagram_background">'+instacptfirst+'</span>';
            document.getElementById('instagram-first-char-bottom-back').innerHTML = '<span class="instagram_background">'+instacptfirst+'</span>';
            document.getElementById('instagram-first-char-bottom').classList.add('animatebottom');
            setTimeout(function () {
                document.getElementById('instagram-first-char-top').classList.remove('animatetop');
                document.getElementById('instagram-first-char-bottom').innerHTML = '<span class="instagram_background">'+instacptfirst+'</span>';
                document.getElementById('instagram-first-char-top').innerHTML = '<span class="instagram_background">'+instacptfirst+'</span>';
                document.getElementById('instagram-first-char-top-back').innerHTML = '<span class="instagram_background">'+instacptfirst+'</span>';
                document.getElementById('instagram-first-char-bottom').classList.remove('animatebottom');
            },250);
        }

        instacptsecond++;
        if (cptsecond < parseInt(instagram_second)+1) {
            actualiser = 1;
            document.getElementById('instagram-second-char-top').classList.add('animatetop');
            document.getElementById('instagram-second-char-bottom').innerHTML = '<span class="instagram_background">'+instacptsecond+'</span>';
            document.getElementById('instagram-second-char-bottom-back').innerHTML = '<span class="instagram_background">'+instacptsecond+'</span>';
            document.getElementById('instagram-second-char-bottom').classList.add('animatebottom');
            setTimeout(function () {
                document.getElementById('instagram-second-char-top').classList.remove('animatetop');
                document.getElementById('instagram-second-char-bottom').innerHTML = '<span class="instagram_background">'+instacptsecond+'</span>';
                document.getElementById('instagram-second-char-top').innerHTML = '<span class="instagram_background">'+instacptsecond+'</span>';
                document.getElementById('instagram-second-char-top-back').innerHTML = '<span class="instagram_background">'+instacptsecond+'</span>';
                document.getElementById('instagram-second-char-bottom').classList.remove('animatebottom');
            },250);
        }

        instacptthird++;
        if (cptthird < parseInt(instagram_third)+1) {
            actualiser = 1;
            document.getElementById('instagram-third-char-top').classList.add('animatetop');
            document.getElementById('instagram-third-char-bottom').innerHTML = '<span class="instagram_background">'+instacptthird+'</span>';
            document.getElementById('instagram-third-char-bottom-back').innerHTML = '<span class="instagram_background">'+instacptthird+'</span>';
            document.getElementById('instagram-third-char-bottom').classList.add('animatebottom');
            setTimeout(function () {
                document.getElementById('instagram-third-char-top').classList.remove('animatetop');
                document.getElementById('instagram-third-char-bottom').innerHTML = '<span class="instagram_background">'+instacptthird+'</span>';
                document.getElementById('instagram-third-char-top').innerHTML = '<span class="instagram_background">'+instacptthird+'</span>';
                document.getElementById('instagram-third-char-top-back').innerHTML = '<span class="instagram_background">'+instacptthird+'</span>';
                document.getElementById('instagram-third-char-bottom').classList.remove('animatebottom');
            },250);
        }

        instacptfour++;
        if (cptfour < parseInt(instagram_four)+1) {
            actualiser = 1;
            document.getElementById('instagram-four-char-top').classList.add('animatetop');
            document.getElementById('instagram-four-char-bottom').innerHTML = '<span class="instagram_background">'+instacptfour+'</span>';
            document.getElementById('instagram-four-char-bottom-back').innerHTML = '<span class="instagram_background">'+instacptfour+'</span>';
            document.getElementById('instagram-four-char-bottom').classList.add('animatebottom');
            setTimeout(function () {
                document.getElementById('instagram-four-char-top').classList.remove('animatetop');
                document.getElementById('instagram-four-char-bottom').innerHTML = '<span class="instagram_background">'+instacptfour+'</span>';
                document.getElementById('instagram-four-char-top').innerHTML = '<span class="instagram_background">'+instacptfour+'</span>';
                document.getElementById('instagram-four-char-top-back').innerHTML = '<span class="instagram_background">'+instacptfour+'</span>';
                document.getElementById('instagram-four-char-bottom').classList.remove('animatebottom');
            },250);
        }
        if (actualiser == 1){
            setTimeout(function () {
                myLoop();
            },250);
        }
    }, 250);
}

document.getElementById('getlikebutton').addEventListener('mousedown',function(){
    cptfirst = 0;
    cptsecond = 0;
    cptthird = 0;
    cptfour = 0;
    instacptfirst = 0;
    instacptsecond = 0;
    instacptthird = 0;
    instacptfour = 0;
    actualiser = 0;
    
    myLoop();
});
              
            
!
999px

Console