问题
i need yout help.
i've two parent div,
<div class="container-fluid" >
<div class="row-fluid" id="id">
in these div I put other div created by an ajax call.
I created a div which will then be populated with data. the div is:
<div class="col-sm-3 col-md-5 space">
<h2 style="color:#900000">###</h2>
<p class="lead">###
<p>
<p style="text-align: right"><i class="fa fa-clock-o"></i>12/5/24</p>
<div class="thumbnail">
<img src="">
</div>
<div class="caption">
<p>Differetn lenght of data -<<< PROBLEM IS HERE
text.</p>
<a href=download="sss" class="padd">Allegato: ssss'</a>
<br>
</div>
</div>
The ajax call make 5 div Of these with a different length.
EDIT OF masonry
回答1:
Use this masonry plugin
HTML
<div class="container masonry">
<div class="block masonry-brick medium"></div>
<div class="block masonry-brick medium"></div>
<div class="block masonry-brick large"></div>
<div class="block masonry-brick medium"></div>
<div class="block masonry-brick medium"></div>
<div class="block masonry-brick small"></div>
<div class="block masonry-brick medium"></div>
<div class="block masonry-brick small"></div>
<div class="block masonry-brick small"></div>
<div class="block masonry-brick medium"></div>
<div class="block masonry-brick large"></div>
<div class="block masonry-brick medium"></div>
<div class="block masonry-brick medium"></div>
<div class="block masonry-brick large"></div>
<div class="block masonry-brick medium"></div>
<div class="block masonry-brick medium"></div>
<div class="block masonry-brick small"></div>
<div class="block masonry-brick medium"></div>
<div class="block masonry-brick small"></div>
<div class="block masonry-brick small"></div>
<div class="block masonry-brick medium"></div>
<div class="block masonry-brick large"></div>
</div>
JS
$('.container').masonry({
// options
itemSelector : '.block',
});
For demo
来源:https://stackoverflow.com/questions/39054644/boostrap-dynamic-div-position