Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
xuqi
9 years ago
Commit
8e2b9e1d07e70981562f28ef37d4ac1d7ae9d955
2 parents
db4e1d5a
e0a372ec
Merge branch 'feature/loader' into develop
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
7 deletions
static/js/plugin/loading.js
static/sass/_loading.scss
static/js/plugin/loading.js
View file @
8e2b9e1
...
...
@@ -15,7 +15,11 @@ var $loading,
// 初始化
function
init
(
$container
)
{
var
html
=
'<div class="loading-mask hide"><div class="loading"></div></div>'
;
var
html
=
'<div class="loading-mask hide">'
+
'<div class="loading">'
+
'<div></div><div></div><div></div>'
+
'</div>'
+
'</div>'
;
hasInit
=
true
;
if
(
$container
===
undefined
)
{
...
...
static/sass/_loading.scss
View file @
8e2b9e1
...
...
@@ -5,16 +5,73 @@
bottom
:
0
;
right
:
0
;
left
:
0
;
@-webkit-keyframes
scale
{
0
%
{
-webkit-transform
:
scale
(
1
);
transform
:
scale
(
1
);
opacity
:
1
;
}
45
%
{
-webkit-transform
:
scale
(
0
.1
);
transform
:
scale
(
0
.1
);
opacity
:
0
.7
;
}
80
%
{
-webkit-transform
:
scale
(
1
);
transform
:
scale
(
1
);
opacity
:
1
;
}
}
@keyframes
scale
{
0
%
{
-webkit-transform
:
scale
(
1
);
transform
:
scale
(
1
);
opacity
:
1
;
}
45
%
{
-webkit-transform
:
scale
(
0
.1
);
transform
:
scale
(
0
.1
);
opacity
:
0
.7
;
}
80
%
{
-webkit-transform
:
scale
(
1
);
transform
:
scale
(
1
);
opacity
:
1
;
}
}
.loading
{
position
:
absolute
;
width
:
100rem
/
$pxConvertRem
;
height
:
40rem
/
$pxConvertRem
;
background
:
image-url
(
'loading.gif'
)
no-repeat
;
background-size
:
100%
100%
;
width
:
60px
;
height
:
20px
;
top
:
50%
;
left
:
50%
;
margin-left
:
-50rem
/
$pxConvertRem
;
margin-top
:
-20rem
/
$pxConvertRem
;
margin-top
:
-10px
;
margin-left
:
-30px
;
>
div
{
display
:
inline-block
;
background
:
#fff
;
width
:
15px
;
height
:
15px
;
@include
border-radius
(
100%
);
margin
:
2px
;
$init
:
0
.12
;
@for
$i
from
1
through
3
{
&
:nth-child
(
#{
$i
}
)
{
-webkit-animation
:
scale
.75s
#{
$init
}
s
infinite
cubic-bezier
(
.2
,.
68
,.
18
,
1
.08
);
animation
:
scale
.75s
#{
$init
}
s
infinite
cubic-bezier
(
.2
,.
68
,.
18
,
1
.08
);
}
$init
:
(
$i
+
1
)
*
0
.12
;
}
}
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment