iview/src/styles/components/spin.less

88 lines
1.7 KiB
Text
Raw Normal View History

2016-09-09 14:29:19 +08:00
@spin-prefix-cls: ~"@{css-prefix}spin";
@spin-dot-size-small: 12px;
@spin-dot-size: 20px;
@spin-dot-size-large: 32px;
.@{spin-prefix-cls} {
color: @primary-color;
vertical-align: middle;
text-align: center;
&-dot {
position: relative;
display: block;
border-radius: 50%;
background-color: @primary-color;
.square(@spin-dot-size);
animation: ani-spin-bounce 1s 0s ease-in-out infinite;
2016-09-09 14:29:19 +08:00
}
&-large &-dot {
.square(@spin-dot-size-large);
}
&-small &-dot {
.square(@spin-dot-size-small);
}
&-fix {
position: absolute;
top: 0;
left: 0;
z-index: @zindex-spin;
.square(100%);
2017-09-18 18:41:24 +08:00
background-color: rgba(255,255,255,.9);
2016-09-09 14:29:19 +08:00
}
2017-09-19 14:26:46 +08:00
&-fullscreen{
z-index: @zindex-spin-fullscreen;
2017-09-24 15:36:14 +08:00
&-wrapper{
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
2017-09-19 14:26:46 +08:00
}
2016-09-09 14:29:19 +08:00
&-fix &-main {
2017-09-18 17:50:28 +08:00
position: absolute;
top: 50%;
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
2016-09-09 14:29:19 +08:00
}
&-fix &-dot {
display: inline-block;
}
&-text,
&-show-text &-dot {
display: none;
}
&-show-text &-text {
display: block;
}
}
2017-09-18 18:41:24 +08:00
// use in Table loading, Table right border is not included in .ivu-table-wrapper, so fix it
.@{table-prefix-cls}-wrapper{
> .@{spin-prefix-cls}-fix{
border: 1px solid @border-color-base;
border-top: 0;
border-left: 0;
}
}
2016-09-09 14:29:19 +08:00
@keyframes ani-spin-bounce {
0% {
transform: scale(0);
2016-09-09 14:29:19 +08:00
}
100% {
transform: scale(1);
2016-09-09 14:29:19 +08:00
opacity: 0;
}
}