【问题标题】:Wordpress - screen scaling in fullWordpress - 全屏缩放
【发布时间】:2017-09-20 01:29:28
【问题描述】:

我正在为我建立一个网站。我安装了 MetaSlider 插件。我希望摄影在整个屏幕上缩放(无需滚动屏幕)。理想情况下,“第一个屏幕”也应该显示菜单栏(底部)。如何做到这一点?

<?php 
    echo do_shortcode("[metaslider id=62 percentwidth=100]"); 
?>

【问题讨论】:

    标签: css wordpress slider


    【解决方案1】:

    为您的菜单设置 50 像素的高度(或任何您喜欢的高度),然后将此高度添加到您的滑块图像中:

    .sticky_header {height: 50px}
    
    .metaslider .slides img {
      height: calc(100vh - 50px); /* The height of the viewport - the height of your menu */
    }
    

    理想情况下,您应该在滑块中添加图像:object-fit: cover;,这样就不会扭曲图像。

    .metaslider .slides img {
       height: calc(100vh - 50px); 
       object-fit: cover;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-20
      • 2011-04-30
      • 2012-05-20
      • 1970-01-01
      • 2018-05-10
      • 2014-09-04
      • 1970-01-01
      • 2018-04-11
      相关资源
      最近更新 更多