mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-11 00:38:36 +08:00
cd306117ae
* fix(components): [carousel] :height is auto and card direction vertical * fix(components): [carousel] :height is auto and card direction vertical * fix(components): [carousel] :height is auto and card direction 垂直 * feat(components): [carousel] height is adaptive when height is auto * feat(components): [carousel] height is adaptive when height is auto * fix(components): [carousel] :height is auto and card direction 垂直 * fix(components): [carousel] :height is auto and card direction 垂直 * fix(components): [carousel] :height is auto test.tsx * fix(components): [carousel] :height is auto and card direction * fix: delete zIndex * fix: delete ts type * fix: add test * fix: css modification * fix: delete doc inside * fix: Revise card width not adaptive * fix: Modify calcCardTranslate * fix: test * fix: calcCardTranslate * fix: remove redundant code
44 lines
1.0 KiB
Vue
44 lines
1.0 KiB
Vue
<template>
|
|
<div class="block text-center" style="height: 300px">
|
|
<span class="demonstration">each carousel-item has a different height</span>
|
|
<el-carousel height="auto" autoplay>
|
|
<el-carousel-item style="height: 100px">
|
|
<h3 class="small justify-center" text="2xl">height 100px</h3>
|
|
</el-carousel-item>
|
|
<el-carousel-item style="height: 200px">
|
|
<h3 class="small justify-center" text="2xl">height 200px</h3>
|
|
</el-carousel-item>
|
|
<el-carousel-item style="height: 300px">
|
|
<h3 class="small justify-center" text="2xl">height 300px</h3>
|
|
</el-carousel-item>
|
|
</el-carousel>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.carousel-item {
|
|
color: #475669;
|
|
opacity: 0.75;
|
|
margin: 0;
|
|
text-align: center;
|
|
}
|
|
|
|
.el-carousel__item h3 {
|
|
color: #475669;
|
|
opacity: 0.75;
|
|
display: flex;
|
|
align-items: center;
|
|
margin: 0;
|
|
text-align: center;
|
|
height: 100%;
|
|
}
|
|
|
|
.el-carousel__item:nth-child(2n) {
|
|
background-color: #99a9bf;
|
|
}
|
|
|
|
.el-carousel__item:nth-child(2n + 1) {
|
|
background-color: #d3dce6;
|
|
}
|
|
</style>
|