I implemented a loading bar that shows while my script is running in the background in a Google Sheets, almost all the elements used in CSS actually work properly, the only thing that doesn´t work is an image thats suppose to be in the center of the loading bar.
I found out how to actually implement the CSS in Google Appscript here CSS with Google App Script. But whenever I use background-image: url(myimage.png); there is no image shown in the loading bar.
CSS
<!DOCTYPE html>
<html lang="es">
<head>
<link rel="shortcut icon" href="../assets/images/ico/favicon.ico" />
<meta name="sitedomain" content="www.sdfsd.com.mx" />
<meta name="country" content="Am" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="stylesheet" type="text/css" href="loader.css"/>
</head>
<body>
<style>
.text-loader {
font-family: Arial, sans-serif;
font-size: 20px;
}
.loader-align {
width:100%;
height:100%;
margin: 0 auto;
}
.center {
text-align: center;
}
.dextra-d {
background-image: url(d_icon.png);
background-repeat: no-repeat;
background-position: center;
}
@keyframes lds-double-ring {
0% {
-webkit-transform: rotate(0);
transform: rotate(0);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@-webkit-keyframes lds-double-ring {
0% {
-webkit-transform: rotate(0);
transform: rotate(0);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes lds-double-ring_reverse {
0% {
-webkit-transform: rotate(0);
transform: rotate(0);
}
100% {
-webkit-transform: rotate(-360deg);
transform: rotate(-360deg);
}
}
@-webkit-keyframes lds-double-ring_reverse {
0% {
-webkit-transform: rotate(0);
transform: rotate(0);
}
100% {
-webkit-transform: rotate(-360deg);
transform: rotate(-360deg);
}
}
.lds-double-ring {
position: relative;
}
.lds-double-ring div {
position: absolute;
width: 160px;
height: 160px;
top: 20px;
left: 20px;
border-radius: 50%;
border: 8px solid #000;
border-color: #1d3f72 transparent #1d3f72 transparent;
-webkit-animation: lds-double-ring 2.6s linear infinite;
animation: lds-double-ring 2.6s linear infinite;
}
.lds-double-ring div:nth-child(2) {
width: 140px;
height: 140px;
top: 30px;
left: 30px;
border-color: transparent #5699d2 transparent #5699d2;
-webkit-animation: lds-double-ring_reverse 2.6s linear infinite;
animation: lds-double-ring_reverse 2.6s linear infinite;
}
.lds-double-ring {
width: 200px !important;
height: 200px !important;
-webkit-transform: translate(-100px, -100px) scale(1) translate(100px, 100px);
transform: translate(-100px, -100px) scale(1) translate(100px, 100px);
}
</style>
<div class="center">
<div class="dextra-d">
<div class="lds-double-ring loader-align">
<div></div>
<div></div>
</div>
</div>
<span class="text-loader">Cargando entrevista...</span>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<?!= include('LoadBar'); ?>
<script>
if (<?= close ?> == "close"){
google.script.host.close();
}
</script>
</body>
</html>