网
塔
科
@@ -22,32 +25,48 @@
-
-
-
+
\ No newline at end of file
diff --git a/src/loading.css b/src/loading.css
index 4daac79..80b38dd 100644
--- a/src/loading.css
+++ b/src/loading.css
@@ -1,4 +1,4 @@
-.loading {
+#loading {
position: fixed;
left: 50%;
top: calc(50% - 40px);
@@ -13,7 +13,7 @@
color: #ffffff;
}
-.loading.isdone {
+#loading.isdone {
top: 50%;
opacity: 0;
-webkit-transition: all .8s;
@@ -24,42 +24,42 @@
transition-delay: .5s;
}
-.loading span {
+#loading span {
-webkit-animation: loading 1.4s infinite alternate;
animation: loading 1.4s infinite alternate;
}
-.loading span:nth-child(1) {
+#loading span:nth-child(1) {
-webkit-animation-delay: 0s;
animation-delay: 0s;
}
-.loading span:nth-child(2) {
+#loading span:nth-child(2) {
-webkit-animation-delay: 0.1s;
animation-delay: 0.1s;
}
-.loading span:nth-child(3) {
+#loading span:nth-child(3) {
-webkit-animation-delay: 0.2s;
animation-delay: 0.2s;
}
-.loading span:nth-child(4) {
+#loading span:nth-child(4) {
-webkit-animation-delay: 0.3s;
animation-delay: 0.3s;
}
-.loading span:nth-child(5) {
+#loading span:nth-child(5) {
-webkit-animation-delay: 0.4s;
animation-delay: 0.4s;
}
-.loading span:nth-child(6) {
+#loading span:nth-child(6) {
-webkit-animation-delay: 0.5s;
animation-delay: 0.5s;
}
-.loading span:nth-child(7) {
+#loading span:nth-child(7) {
-webkit-animation-delay: 0.6s;
animation-delay: 0.6s;
}
diff --git a/src/pace.js b/src/pace.js
index cf7dc93..8c51387 100644
--- a/src/pace.js
+++ b/src/pace.js
@@ -38,6 +38,8 @@
};
};
+
+ // 默认配置
defaultOptions = {
className: '',
catchupTime: 100,
@@ -71,6 +73,7 @@
return (_ref = typeof performance !== "undefined" && performance !== null ? typeof performance.now === "function" ? performance.now() : void 0 : void 0) != null ? _ref : +(new Date);
};
+ // 动画
requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame;