jQuery prettyPhoto-设置灯箱的最大高度和宽度 [英] jQuery prettyPhoto - Setting a max height and width for the lightbox

查看:121
本文介绍了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-设置灯箱的最大高度和宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆