【发布时间】:2023-02-16 04:05:15
【问题描述】:
当我将它的显示设置为 flex 时,轮播没有正确显示图像
<div className="ProductDetails>
<div>
<Carousel animation='slide'>
{product.images && product.images.map((item, i) => (
<img
className='CarouselImage'
key={item.url}
src={item.url}
alt={`Slide ${i}`}
/>
))}
</Carousel>
</div>
</div>
CSS代码
.ProductDetails>div {
width: 100%;
justify-content: space-evenly;
align-items: center;
padding: 2vmax;
box-sizing: border-box;
border: 1px solid #fff;
display: flex;
flex-direction: column;
}
【问题讨论】:
-
欢迎来到 SO。请解释您想要实现的目标以及原因,尤其是提出一个具体问题。您的第一个
div最后缺少">。另外,我自己不是 CSS 专家,但那些是 CSS 专家的人可能需要相关的 HTML 和 CSS 才能为您提供帮助。 -
Carousel Image 类的样式定义是什么?
标签: css reactjs carousel react-material-ui-carousel