【问题标题】:Photoswipe adding margin to lightbox imagePhotoswipe 为灯箱图像添加边距
【发布时间】:2015-01-10 14:33:36
【问题描述】:

我在这里使用http://photoswipe.com/http://www.michelperezphoto.com/

尝试添加内边距或边距,使灯箱中显示的图像不占屏幕的整个宽度和/或高度...

试过这个: .pswp__item { 保证金:5%; }

但是现在灯箱图像没有居中...它稍微偏右...

任何见解将不胜感激......

干杯.....

【问题讨论】:

    标签: photoswipe


    【解决方案1】:

    如果这对某人有帮助,我使用这个得到了预期的效果:

    @media (min-width: 900px) { 
     .pswp__item {
        margin: 5% 5% 5% 0%;
      }
    }
    

    【讨论】:

      【解决方案2】:

      我为我的图像应用了边框半径和阴影,使用上面的边距技术掩盖了我的图像并且看起来不太好。我找到了更好的解决方案:

      .pswp__img {
          transform: scale(0.9);
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2015-04-14
        • 1970-01-01
        • 2015-03-01
        • 2013-03-03
        • 2014-08-22
        • 2011-04-01
        • 1970-01-01
        相关资源
        最近更新 更多