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 {
-webkit-pointer-events: none;
pointer-events: none;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
z-index: 2000;
position: fixed;
margin: auto;
top: 12px;
left: 0;
right: 0;
bottom: 0;
width: 200px;
height: 50px;
overflow: hidden;
}
.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:-200px;
}
.pace .pace-progress {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
display: block;
position: absolute;
right: 100%;
margin-right: -7px;
width: 93%;
top: 7px;
height: 14px;
font-size: 12px;
background: #29d;
color: #29d;
line-height: 60px;
font-weight: bold;
font-family: Helvetica, Arial, "Lucida Grande", sans-serif;
-webkit-box-shadow: 120px 0 #fff, 240px 0 #fff;
-ms-box-shadow: 120px 0 #fff, 240px 0 #fff;
box-shadow: 120px 0 #fff, 240px 0 #fff;
}
.pace .pace-progress:after {
content: attr(data-progress-text);
display: inline-block;
position: fixed;
width: 45px;
text-align: right;
right: 0;
padding-right: 16px;
...
JavaScript
$(function() {
Pace.on("done", function(){
$("#contents").fadeIn(1000);
$(".imagen").fadeOut(1000);
});
});