I m使用jquery masonry,并遇到麻烦,难以找到图像/海报以适当打脚(见所附图像)。
The problem is that there is too much white space/ gap between the posts/images.
我如何确定这一点?
感谢
Faisal
INDEX./2006/2。
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script src="/assets/jquery.js"></script>
<script src="/assets/jquery.masonry.min.js"></script>
<style>
.item {
width: 200px;
margin: 8px;
float: left;
border: 1px solid #999999;
background-color: #F7F7F7;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
padding: 6px;
color: black;
}
</style>
<div id="container">
<br />
<br />
<br />
<% @posts.each do |post| %>
<div class="item">
<%= post.body %>
<br />
<%= post.title %>
<br />
<i>RSVP -- <%= post.job %>.</i>
<br />
<i>Created <%= time_ago_in_words(post.created_at) %> ago.</i>
</div>
<script type="text/javascript">
$(window).load() {
$( #container ).masonry({
itemSelector: .box ,
columnWidth: function( containerWidth ) {
return containerWidth / 5;
});
});
</script>
<% end %>
</div>