我有一些代码如下:
HTML:
<ul id="product-matrix" class="clearfix">
<li class="product product-medium">
<a href="#" class="showQuickViewPan">
<img src="../images/556116.jpg" class="product-image" height="243" width="243" />
</a>
<div class="swatch-container">
<p class="visually-hidden">Color Options:</p>
</div>
<div class="product-info">
<h2> <a href="#"> Travelpro FlightPro Rolling Tote</a> </h2>
<p class="price-original price-small"> <span>regular </span>$299.99</p>
</div>
<div class="ratings-info">
<a class="ratingsimage" href="#"><img src="../images/rating-5.0.gif" alt=""/></a>
<span class="reviewcount">(<a href="#">5</a>)</span>
</div>
<img src="../images/Online_Exclusive_v1_m56577569836982197.gif" alt="" />
<img src="../images/OnlyAtKohls_Burg_v1_m56577569836982195.gif" alt="" />
</li>
<li class="product product-medium">
<a href="#" class="sr-item-new"><span class="sr-new-img"></span>
<img src="../images/742063_Black.jpg" class="product-image" height="243" width="243"/>
</a>
<div class="swatch-container">
<p class="visually-hidden">Color Options:</p>
<ul class="clearfix"><li></li></ul>
</div>
<div class="product-info">
<h2><a href="#">Columbia Wool Jacket</a></h2>
<p class="price-original"><span>original </span>$200.00</p>
</div>
<div class="ratings-info">
<a class="ratingsimage" href="#"><img src="../images/rating-5.0.gif" alt=""/></a>
<span class="reviewcount">(<a href="#">5</a>)</span>
</div>
<img src="../images/Online_Exclusive_v1_m56577569836982197.gif" />
<img src="../images/Online_Exclusive_v1_m56577569836982197.gif" />
</li>
...
</ul>
在上面的代码中,产品信息DIV 可能有 2 到 10 行文本,所以现在我想要实现的是我想计算产品信息DIV 的高度()并将相同的高度分配给所有产品-所有 LI 中的信息 DIV,我无法解决。任何帮助是极大的赞赏。谢谢!!