@nutui/nutui-react
Version:
京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序
136 lines (132 loc) • 2.97 kB
CSS
/* #ifdef harmony */
/* #endif */
/* #ifndef harmony */
/* #endif */
.nut-image {
display: block;
position: relative;
}
.nut-image-default {
display: block;
width: 100%;
height: 100%;
}
.nut-image.nut-image-round {
border-radius: 50%;
overflow: hidden;
}
.nut-image-loading {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: var(--nutui-color-background, #f2f3f5);
background-size: 100% 100%;
}
.nut-image-error {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: var(--nutui-color-background, #f2f3f5);
background-size: 100% 100%;
}
[dir=rtl] .nut-image .nut-img-loading,
.nut-rtl .nut-image .nut-img-loading {
left: auto;
right: 0;
}
[dir=rtl] .nut-image .nut-img-error,
.nut-rtl .nut-image .nut-img-error {
left: auto;
right: 0;
}
.nut-avatar-group {
display: flex;
flex-direction: row;
flex: 0 0 auto;
}
.nut-avatar-group-avatar,
.nut-avatar-group .nut-avatar {
border: 1px solid #fff;
margin-left: -8px;
}
.nut-avatar-group-avatar:not(:first-of-type),
.nut-avatar-group .nut-avatar:not(:first-of-type) {
margin-left: -8px;
}
[dir=rtl] .nut-avatar-group .nut-avatar:not(:first-of-type),
.nut-rtl .nut-avatar-group .nut-avatar:not(:first-of-type) {
margin-left: 0;
margin-right: -8px;
}
.nut-avatar {
position: relative;
flex: 0 0 auto;
display: flex;
justify-content: center;
align-items: center;
width: var(--nutui-avatar-normal-width, 40px);
height: var(--nutui-avatar-normal-height, 40px);
}
.nut-avatar-round {
border-radius: 999px;
overflow: hidden;
}
.nut-avatar-square {
border-radius: var(--nutui-avatar-square, 5px);
}
.nut-avatar-first-child {
margin-left: 0;
margin-right: 0;
}
.nut-avatar-img {
width: 100%;
height: 100%;
flex-shrink: 0;
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: center center;
}
.nut-avatar-icon {
background-size: 100% 100%;
}
.nut-avatar-text {
display: flex;
justify-content: center;
align-items: center;
}
.nut-avatar-large {
width: var(--nutui-avatar-large-width, 60px);
height: var(--nutui-avatar-large-height, 60px);
}
.nut-avatar-large-img {
width: var(--nutui-avatar-large-width, 60px);
height: var(--nutui-avatar-large-height, 60px);
}
.nut-avatar-large-icon {
width: var(--nutui-avatar-large-width, 60px);
height: var(--nutui-avatar-large-height, 60px);
}
.nut-avatar-large-text {
width: var(--nutui-avatar-large-width, 60px);
height: var(--nutui-avatar-large-height, 60px);
}
.nut-avatar-small {
width: var(--nutui-avatar-small-width, 32px);
height: var(--nutui-avatar-small-height, 32px);
}
.nut-avatar-small-text {
width: var(--nutui-avatar-small-width, 32px);
height: var(--nutui-avatar-small-height, 32px);
}