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='imagen'></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%;;
}
.imagen {
position: absolute;
z-index:9999;
width:100%;
height:100%;
background:url(http://www.synaccount.cl/logos/oscuro.png) no-repeat center center; ;
}
.pace {
-webkit-pointer-events: none;
pointer-events: none;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.pace-inactive {
display: none;
}
.pace .pace-progress {
background-color: rgba(255, 153, 0, 0.19999999999999996);
position: fixed;
z-index: -1;
top: 0;
right: 100%;
bottom: 0;
width: 100%;
}
.sube{
position: absolute;
top:-200px;
}
iframe{
position: relative;
width:100%;
height:100%;
}
JavaScript
$(function() {
Pace.on("done", function(){
$("#contents").fadeIn(1000);
$(".imagen").fadeOut(1000);
});
});