我正在試圖建立一個畫廊,我使用這個驚人的庫叫jquery.CollagePlus
(https://github.com/ed-lea/jquery-collagePlus)。我最初沒有使用height
和width
屬性。它工作完美。jQuery拼貼加上寬度和高度
現在我想用height
和width
屬性指定。這是我的HTML:
<div class='album-photoss'>
<!-- - Photo.all.each do |p| -->
<!-- = image_tag small(p), width: p.small_version_width, height: p.small_version_height -->
<img height='150' src='http://deelay.me/3500?http://placehold.it/350x150/69D2E7/ffffff' width='350'>
<img height='180' src='http://deelay.me/2500?http://placehold.it/320x180/A7DBD8/ffffff' width='320'>
<img height='300' src='http://deelay.me/1500?http://placehold.it/320x300/E0E4CC/ffffff' width='320'>
<img height='500' src='http://deelay.me/4000?http://placehold.it/472x500/F38630/ffffff' width='472'>
<img height='360' src='http://deelay.me/3200?http://placehold.it/540x360/FA6900/ffffff' width='540'>
<img height='600' src='http://deelay.me/2000?http://placehold.it/800x600/ECD078/ffffff' width='800'>
<img height='120' src='http://deelay.me/1200?http://placehold.it/400x120/D95B43/ffffff' width='400'>
<img height='300' src='http://deelay.me/4500?http://placehold.it/300x300/C02942/ffffff' width='300'>
<img height='500' src='http://deelay.me/4500?http://placehold.it/320x500/542437/ffffff' width='320'>
<img height='300' src='http://deelay.me/4500?http://placehold.it/450x300/53777A/ffffff' width='450'>
<img height='360' src='http://deelay.me/3200?http://placehold.it/540x360/FA6900/ffffff' width='540'>
<img height='600' src='http://deelay.me/2000?http://placehold.it/800x600/ECD078/ffffff' width='800'>
<img height='120' src='http://deelay.me/1200?http://placehold.it/400x120/D95B43/ffffff' width='400'>
<img height='300' src='http://deelay.me/4500?http://placehold.it/300x300/C02942/ffffff' width='300'>
<img height='500' src='http://deelay.me/4500?http://placehold.it/320x500/542437/ffffff' width='320'>
<img height='300' src='http://deelay.me/4500?http://placehold.it/450x300/53777A/ffffff' width='450'>
</div>
這裏是我的CoffeeScript:
$(document).ready ->
$(".album-photoss").removeWhitespace().collagePlus
fadeSpeed: 2000
targetHeight: 200
我只看到一個空白頁。經過檢查,我可以看到圖像已應用以下樣式:
<img height="150" src="http://deelay.me/3500?http://placehold.it/350x150/69D2E7/ffffff" width="350" style="height: 0px; margin-bottom: 0px; margin-right: 0px; display: inline-block; vertical-align: bottom; overflow: hidden; opacity: 1;">
任何人都可以請幫助我這一個?
[deelay.me](http://deelay.me)只有與圖像'.gif' – AvrilAlejandro
哥們請功能!還有誰? –