看看这个html:
<div class="parent_container">
<div class="container">
<div class="item">
<img src="http://mountainguides.com/wordpress/wp-content/uploads/2010/11/Illinizas-photo-ty-gimenez.jpg"/>
</div>
<div class="item">
<img src="http://mountainguides.com/wordpress/wp-content/uploads/2010/11/IMG_0700.jpg"/>
</div>
</div>
</div>
我正在尝试div: item
排成一行,div: container
宽度将自动调整大小以适合其子项。我不知道的数量,div: item
所以我不能为div: container
.
这是一个jsfiddle:http: //jsfiddle.net/trongcuong1710/cDqSj/4/