2013-08-05 5 views
0

我用在http://fotorama.io/customize/thumbnails/當我使用Fotorama控件時,如何設置原始圖像的高度和寬度?

的Fotorama控制文件告訴我,我可以調整高度和縮略圖通過設置寬度

<img src="1_thumb.jpg" width="144" height="96"> 

現在我希望能設置高度和原始圖像1的寬度.jpg,但代碼<a href="image/1.jpg" style="display:block; width:100px; height:200px;">不起作用。

<div class="fotorama" data-nav="thumbs"> 
    <a href="1.jpg"><img src="1_thumb.jpg" width="144" height="96"></a> 
    <a href="2.jpg"><img src="2_thumb.jpg" width="64" height="128"></a> 
    <a href="3.jpg"><img src="3_thumb.jpg" width="100" height="100"></a> 
</div> 
+0

首先,它說:「默認情況下,縮略圖是一個64×64的正方形,用data-thumb-width和data-thumb-height來調整。 – dezman

+0

我可以調整縮略圖的高度和寬度,但我無法調整原始圖像的高度和寬度 – HelloCW

回答

0

只可以用幾個屬性調整整個Fotorama的大小:

  • data-width
  • data-ratio
  • data-min-width
  • data-max-width
  • data-min-height
  • data-max-height

http://fotorama.io/customize/dimensions/

那麼試試這個:

<div class="fotorama" 
    data-width="100" 
    data-height="200" 
    data-nav="thumbs"> 

而且你有一些選項,以適應圖像插入fotorama:http://fotorama.io/customize/fit/

這應該足以控制圖像的大小。

相關問題