JSFiddle - React, Tailwind, and code Playground
by Juan Muñoz
HTML
<script src="https://raw.githubusercontent.com/HubSpot/pace/v1.0.0/pace.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pace/1.0.2/pace.js"></script>
<div class='pace imagen sube'></div>
<div class="pace pace-inactive">
<div class="pace-progress" data-progress-text="100%" data-progress="99" style="width: 100%;">
<div class="pace-progress-inner"></div>
</div>
<div class="pace-activity"><div class='imagen pace-progress'></div></div>
</div>
<iframe src='http://www.synaccount.cl/' id='contents'></iframe>
CSS
#contents {
position:absolute;
display: none;
}
#result{
width:100%;
height: 100%;;
}
.pace.pace-inactive {
display: none;
}
.pace {
-webkit-pointer-events: none;
pointer-events: none;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
z-index: 2000;
position: fixed;
height: 60px;
width: 100px;
margin: auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.imagen {
position: absolute;
z-index:9999;
width:248px;
height:158px;
top:30;
background:url(http://www.synaccount.cl/logos/syn1.png) no-repeat center center; ;
}
.sube{
position: absolute;
top:-250px;
}
.pace .pace-progress {
z-index: 2000;
position: absolute;
height: 60px;
width: 100px;
-webkit-transform: translate3d(0, 0, 0) !important;
-ms-transform: translate3d(0, 0, 0) !important;
transform: translate3d(0, 0, 0) !important;
}
.pace .pace-progress:before {
content: attr(data-progress-text);
text-align: center;
color: #fff;
background: #29d;
border-radius: 50%;
font-family: "Helvetica Neue", sans-serif;
font-size: 14px;
font-weight: 100;
line-height: 1;
padding: 20% 0 7px;
width: 50%;
height: 40%;
margin: 10px 0 0 30px;
display: block;
z-index: 999;
position: absolute;
}
.pace .pace-activity {
font-size: 15px;
line-height: 1;
z-index: 2000;
position: absolute;
height: 60px;
width: 100px;
display: block;
-webkit-animation: pace-theme-center-atom-spin 2s linear infinite;
-moz-animation: pace-theme-center-atom-spin 2s linear infinite;
-o-animation: pace-theme-center-atom-spin 2s linear infinite;
animation: pace-theme-center-atom-spin 2s linear infinite;
}
.pace .pace-activity {
border-radius: 50%;
border: 5px solid #29d;
content: ' ';
display: block;
position: absolute;
top: 0;
left: 0;
height: 60px;
width: 100px;
}
.pace .pace-activity:after {
border-radius: 50%;
border: 5px solid #29d;
content: ' ';
display: block;
position: absolute;
...
JavaScript
$(function() {
Pace.on("done", function(){
$("#contents").fadeIn(1000);
$(".imagen").fadeOut(1000);
});
});