【问题标题】:jQuery prettyPhoto - Setting a max height and width for the lightboxjQuery prettyPhoto - 为灯箱设置最大高度和宽度
【发布时间】:2012-07-23 17:46:32
【问题描述】:

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

我尝试更改 prettyPhoto.css 文件,但没有成功,我尝试查看 prettyPhoto.js 文件,但无法确定尺寸的实际设置方式!?

有人知道怎么做吗?

【问题讨论】:

    标签: jquery prettyphoto css


    【解决方案1】:
       $(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
          });
        });
    

    fixed window-size in prettyphoto

    【讨论】:

      【解决方案2】:

      Here 可能是解决您的问题的方法。这是对我帮助最大的。

      【讨论】:

        【解决方案3】:

        在 PrettyPhoto.css 文件中查找 div.pp_pic_holder /css/prettyPhoto.css 并使用!important 应用所需的宽度 前任。 width: 825px !important;

        【讨论】:

          猜你喜欢
          • 2012-02-22
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2023-03-23
          • 2021-03-02
          • 1970-01-01
          • 2018-11-08
          • 1970-01-01
          相关资源
          最近更新 更多