卡片大小不均(css)

 收藏

我有卡传送带在反应。卡根据其内容增加其高度。 这是我的代码。


 <Slider {...carouselCardProps} ref={(node: any) => (carouselCardContainer = node)} >
                {gameNewsData &&
                  gameNewsData.map(data => (
                    <NewsItem
                      gameData={data}
                      skeletonLoading={false}
                    ></NewsItem>
                  ))}        
</Slider>
<RightOutlined className="cxe-right-arrow" onClick={() => carouselCardContainer.slickNext()} />

newsITem组件

 <div className="cxe-news-card">
        <div className="cxe-news-item-header">
            <div className="cxe-news-avatar ">
              <img alt="avatar" src={gameData.source.page.page_logo.url} />
            </div>
            <div className="cxe-news-content">
              <span>{gameData.source.name}</span>
              <span>
                {moment
                  .unix(gameData.created_at)
                  .format("MM/DD/YYYY  hh:mm:ss")}
              </span>
            </div>
        </div>
        <div className="cxe-new-section">        
          <img alt="newsItem" src="https://user-images.githubusercontent.com/194400/49531010-48dad180-f8b1-11e8-8d89-1e61320e1d82.png"/>
          <div className="cxe-news-content-container">      
              <h3 className="cxe-news-heading">{gameData.title}</h3>
              <p className="cxe-news-content-details">{gameData.summary}</p>
              <a className="cxe-read-more" href="/">Read More</a>
          </div>
        </div>
      </div>

如果h3有2行文字,那么卡片变得不相等,我们该如何解决

回复