admin管理员组文章数量:1404352
I'm using prettyphoto for a photo gallery in a django-app. My Images have a maximum height/width (with sorl-thumbnail), but the apect-ratios are different. Because of that, the window of prettyphoto also changes it's apect-ratio and the go-forward/go-back Buttons change positions (they move) everytime it loads the next/previous image. Is there a way to make prettyphoto have a fixed window size? Or add borders to the images so that their format is, for example, square. But I don't want to crop the image.
Thanks in advance Jacques
I'm using prettyphoto for a photo gallery in a django-app. My Images have a maximum height/width (with sorl-thumbnail), but the apect-ratios are different. Because of that, the window of prettyphoto also changes it's apect-ratio and the go-forward/go-back Buttons change positions (they move) everytime it loads the next/previous image. Is there a way to make prettyphoto have a fixed window size? Or add borders to the images so that their format is, for example, square. But I don't want to crop the image.
Thanks in advance Jacques
Share Improve this question asked Jun 24, 2011 at 14:26 JacquesKnieJacquesKnie 211 gold badge1 silver badge2 bronze badges1 Answer
Reset to default 3There may not be any way to do what you want without modifying the prettyPhoto.js script.
There are some options to prettyPhoto you could play with, to see if you can get the desired effect:
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto({
allow_resize: true, /* Resize the photos bigger than viewport. true/false */
default_width: 500,
default_height: 344,
horizontal_padding: 20
});
});
Good luck!
ian.
本文标签: javascriptfixed windowsize in prettyphotoStack Overflow
版权声明:本文标题:javascript - fixed window-size in prettyphoto - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744798037a2625691.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论