我在 http://fotorama.io/customize/thumbnails/ 使用 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>
最佳答案
您只能通过几个属性调整整个 Fotorama 的大小:
数据宽度
数据比
数据最小宽度
数据最大宽度
数据最小高度
数据最大高度
http://fotorama.io/customize/dimensions/
那么试试这个:
<div class="fotorama"
data-width="100"
data-height="200"
data-nav="thumbs">
并且您有一些选项可以将图像放入相片中:http://fotorama.io/customize/fit/ .
这应该足以控制图像的大小。
关于jquery - 使用Fotorama控件时如何设置原图的高宽?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18049808/