以下是我提供推荐书的个人代码。但是,由于每个人都有不同长度的推荐信,因此这些方框的大小不同。如何使盒子长度相等?
<div class="wrapper wrapper-style2">
<article id="work">
<header>
<h2>Achieve your nutritional goals.</h2>
<span>One step at a time.</span>
</header>
<div class="container">
<div class="row">
<div class="4u">
<section class="box box-style1">
<div class="circular" style= "margin: 0 auto">
<img src="images/eric-hinman.jpg" style="width: 150px;"></img>
</div>
<h3>Eric</h3>
<p>"As an avid triathlete + owner of a Crossfit gym, I'm constantly looking for new ways to eat and live healthy. Zach has been a wealth of knowledge with respect to both."</p>
</section>
</div>
<div class="4u">
<section class="box box-style1">
<div class="circular" style= "margin: 0 auto">
<img src="images/Carl_Schramm.jpg" style="width: 155px;"></img>
</div>
<h3>Carl</h3>
<p>"Zach was very helpful in getting me into the paleo way of eating and the results were real. Among other things, I'm back to my college weight."</p>
</section>
</div>
<div class="4u">
<section class="box box-style1">
<div class="circular" style= "margin: 0 auto">
<img src="images/JoshK.jpg" style="width: 150px;"></img>
</div>
<h3>Josh</h3>
<p>"Zach made me realize that healthy eating was an easy and realistic option."</p>
</section>
</div>
</div>
</div>
答案 0 :(得分:-1)
欢迎来到stackoverflow!
您可以像这样在css中设置框高度和宽度......
<style>
.boxes{
width:200px;
overflow:auto;
}
</style>
如果内容大于框,则overflow属性允许滚动。
您可以在此处查看一个有效的示例:http://jsfiddle.net/SXXe6/