本文介绍了jQuery prettyPhoto-设置灯箱的最大高度和宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我已经安装了Pretty Photo jQuery插件,但是我需要设置灯箱的最小和最大高度和宽度,并且似乎无法使其正常工作.

I have installed the Pretty Photo jQuery plugin but I need to set a min and max height and width of the lightbox and can't seem to get it working.

我尝试更改prettyPhoto.css文件,但是没有运气,我尝试查看了prettyPhoto.js文件,但无法弄清楚尺寸的实际设置方式!?

I've tried changing the prettyPhoto.css file and no luck, I tried looking at the prettyPhoto.js file and can't work out how the dimensions are actually set!?

任何人都知道如何执行此操作吗?

Anyone have any idea how to do this?

推荐答案

   $(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
      });
    });

在prettyphoto中修复了窗口大小

这篇关于jQuery prettyPhoto-设置灯箱的最大高度和宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 18:41