javascript - Gmail progress bar css code issue -
i trying progress bar 1 gmail using so, found code in web page :http://cssdeck.com/labs/new-gmail-styled-progress-bar, unfortunately progress bar displaying in internet explorer, not in google chrome , mozilla firefox. have tried ancient version of google chrome (version 41) , worked. if can me appreciate it.
css :
.loader_box { text-align: center; width: 320px; border: 1px solid #999; padding: 1px; height: 8px; margin-right: auto; margin-left: auto; } .loader { width: 0; height: 100%; background-color: #6188f5; background-repeat: repeat-x; background-position: 0 0; /*background-size*/ -webkit-background-size: 16px 8px; -moz-background-size: 16px 8px; -o-background-size: 16px 8px; background-size: 16px 8px; background-image: -webkit-linear-gradient(315deg,transparent,transparent 33%,rgba(0, 0, 0, 0.12) 33%,rgba(0, 0, 0, 0.12) 66%,transparent 66%,transparent); background-image: -moz-linear-gradient(315deg,transparent,transparent 33%,rgba(0, 0, 0, 0.12) 33%,rgba(0, 0, 0, 0.12) 66%,transparent 66%,transparent); background-image: -o-linear-gradient(315deg,transparent,transparent 33%,rgba(0, 0, 0, 0.12) 33%,rgba(0, 0, 0, 0.12) 66%,transparent 66%,transparent); background-image: linear-gradient(315deg,transparent,transparent 33%,rgba(0, 0, 0, 0.12) 33%,rgba(0, 0, 0, 0.12) 66%,transparent 66%,transparent); /*animation*/ -webkit-animation: load 5s linear 0 infinite; -moz-animation: load 5s linear 0 infinite; -ms-animation: load 5s linear 0 infinite; -o-animation: load 5s linear 0 infinite; animation: load 5s linear 0 infinite; } /* animate stuff */ @-webkit-keyframes load { 0% { width: 0% ; background-position:0 0;} 100% { width: 100%; background-position:-40px 0; } } @-ms-keyframes load { 0% { width: 0% ; background-position:0 0;} 100% { width: 100%; background-position:-40px 0; } } @-o-keyframes load { 0% { width: 0% ; background-position:0 0;} 100% { width: 100%; background-position:-40px 0; } } @keyframes load { 0% { width: 0% ; background-position:0 0;} 100% { width: 100%; background-position:-40px 0; } }
html :
<div class="loader_box"> <div class="loader"></div> </div>
javascript :
<script> var displayloadercount = 0; function printmsg(message, clearqueue){ displayloadercount--; if (!message || displayloadercount < 0){ message = "an error occured"; displayloadercount=0; } if (clearqueue){ displayloadercount=0; } if (displayloadercount==0){ $(".loader_box").hide(); $("input").prop("disabled", false); $("button").prop("disabled", false); $("select").prop("disabled", false); $("div").prop("disabled", false); $(".message-section").html(message).fadein("slow", function(){}).delay(5000).fadeout("slow",function() {}); $(".credits-section").hide().delay(5700).fadein("slow",function() {}); }else{ $(".message-section").html(message).fadein("slow", function(){}); $(".credits-section").hide(); } } function displayloading(){ $(".loader_box").show(); displayloadercount++; $("input").prop("disabled", true); $("button").prop("disabled", true); $("select").prop("disabled", true); $("div").prop("disabled", true); } </script>
i believe have found way make work; although i'm not sure why!
all did remove 0
-webkit-animation of .loader. (line 37 on css section) i.e:
old version: -webkit-animation: load 5s linear 0 infinite;
new version: -webkit-animation: load 5s linear infinite;
http://cssdeck.com/labs/cufgituy
if interested, w3c standard provided here:
Comments
Post a Comment