在WordPress主题幻灯片显示img缩小?

时间:2017-08-09 13:44:04

标签: html css wordpress width

我刚刚得到了这个主题,并尝试在文档中导入像推荐大小的背景图像,但似乎有些奇怪 这些图像在主题style.css

中有CSS问题

这是我网站的链接 http://test.doublelift.kr

以下是实际模板的演示

http://www.cssvillain.com/hungry/

如果您调整窗口大小并看到图像文件缓慢缩小而不是根据px更改宽度,则问题很严重。

图片宽度是基于我所获得的模板上的百分比,因此我尝试将其设置为自动并根据高度编写样式,就像原始模板一样 但它似乎正在从其他地方读取风格 在Chrome的开发者工具

上没有成功

感谢您的帮助

2 个答案:

答案 0 :(得分:0)

#single-page-header {
    height: 1000px !important;
    overflow-y: visible !important;
}

.cycle-slideshow {
    position: relative !important;
}

#single-pager-header .cycle-slideshow img {
    display: block !important;
    max-height: 1000px !important;
    width: auto !important;
}

@media screen and (max-width: 1370px) and (min-width: 1025px) {
    #single-page-header {
        height: 720px !important;
    }

    #single-page-header .cycle-slideshow img {
        max-height: 720px !important;
    }
}

@media screen and (max-width: 1024px) {
    .single-page-header-content {
        overflow: hidden !important;
    }

    .single-page-header-content .cycle-slide-show {
        overflow: hidden !important;
    }
}

@media screen and (max-width: 1024px) and (min-width: 768px) {
    #single-page-header .cycle-slideshow img {
        max-height: 1000px;
    }
}

@media screen and (max-width: 767px) {
    #single-page-header {
        height: 500px !important;
        overflow: hidden !important;
    }
}

@media screen and (min-width: 1025px) {
    #single-page-header .cycle-slideshow img {
        max-height: 1000px;
    }
}

答案 1 :(得分:0)

您可以在此处更改特定屏幕尺寸选项的旋转滑块设置,然后根据您的要求更改css。 这是我看到的最佳处理方式。