@tarojs/components
Version:
73 lines (71 loc) • 1.14 kB
CSS
img[src=""] {
opacity: 0;
}
taro-image-core {
display: inline-block;
overflow: hidden;
position: relative;
width: auto;
height: auto;
font-size: 0;
}
.taro-img.taro-img__widthfix {
height: 100%;
}
.taro-img__mode-scaletofill {
width: 100%;
height: 100%;
}
.taro-img__mode-aspectfit {
max-width: 100%;
max-height: 100%;
}
.taro-img__mode-aspectfill {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.taro-img__mode-aspectfill--width {
min-width: 100%;
height: 100%;
}
.taro-img__mode-aspectfill--height {
width: 100%;
min-height: 100%;
}
.taro-img__mode-widthfix {
width: 100%;
}
.taro-img__mode-heightfix {
height: 100%;
}
.taro-img__mode-top {
width: 100%;
}
.taro-img__mode-bottom {
position: absolute;
bottom: 0;
width: 100%;
}
.taro-img__mode-left {
height: 100%;
}
.taro-img__mode-right {
position: absolute;
right: 0;
height: 100%;
}
.taro-img__mode-topright {
position: absolute;
right: 0;
}
.taro-img__mode-bottomleft {
position: absolute;
bottom: 0;
}
.taro-img__mode-bottomright {
position: absolute;
right: 0;
bottom: 0;
}