@nutui/nutui-react
Version:
京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序
69 lines (68 loc) • 1.61 kB
CSS
/* #ifdef harmony */
/* #endif */
/* #ifndef harmony */
/* #endif */
.nut-skeleton {
line-height: 0px;
font-size: 0px;
}
.nut-skeleton-content {
position: relative;
display: inline-flex;
width: var(--nutui-skeleton-line-width, 100%);
background: var(--nutui-skeleton-background, var(--nutui-color-surface-1));
border-radius: var(--nutui-skeleton-line-border-radius, 0);
overflow: hidden;
}
.nut-skeleton-content-normal {
height: var(--nutui-skeleton-line-normal-height, 24px);
}
.nut-skeleton-content-large {
height: var(--nutui-skeleton-line-large-height, 32px);
}
.nut-skeleton-content-small {
height: var(--nutui-skeleton-line-small-height, 16px);
margin-top: 8px;
}
.nut-skeleton-content-small-0 {
margin-top: 0;
}
.nut-skeleton-animation {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.02) 50%, rgba(0, 0, 0, 0) 100%);
animation-name: nut-skeleton;
animation-delay: 0s;
animation-duration: 0.6s;
animation-direction: normal;
animation-fill-mode: both;
animation-play-state: running;
animation-iteration-count: 1;
animation-timing-function: linear;
}
@keyframes nut-skeleton {
from {
transform: translateX(-100%);
}
to {
transform: translateX(100%);
}
}
[dir=rtl] .nut-skeleton-animation,
.nut-rtl .nut-skeleton-animation {
left: auto;
right: 0;
animation: nut-skeleton-rtl 2s linear 0s infinite;
}
@keyframes nut-skeleton-rtl {
from {
transform: translateX(100%);
}
to {
transform: translateX(-100%);
}
}