![](/img/trans.png)
[英]How can I apply the same jQuery hover animation to two divs of different height side-by-side?
[英]How can I make two different components the same height
我有一個反應卡,可以根據某個道具是否激活來渲染兩種不同的東西。 當我將它們並排放置時,如何確保兩個不同的物體的高度相同,因為它們的尺寸不一樣?
這是代碼:
<div className={cardInfoClasses}> <h3 className={titleClasses}>{this.props.name}</h3> {cardMain} </div>
cardMain可以是:
<div> <Progress productData={productData} className='mobile_hide'/> </div>;
要么
<CardButton initialData = {this.props.data}/>
您可以使用display flex或table完成。 您可以為父級顯示提供柔韌性,並調整其他屬性,例如justify-elements和width。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.