html - wordpress 主题中的幻灯片图像缩小?

标签 html css wordpress width

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

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

下面是实际模板的演示

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

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

图像宽度是基于我得到的模板的百分比,所以我试图让它自动并根据原始模板的高度编写样式 但似乎它正在从其他地方读取样式 在 chrome 的开发者工具上没有成功

感谢你的帮助

最佳答案

#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;
    }
}

关于html - wordpress 主题中的幻灯片图像缩小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45592486/

相关文章:

jquery - UIKit 下拉不工作

wordpress - 当 WooCommerce 购物车页面上的数量更新时拆分购物车项目

html - 使用CSS在子div上应用不同的样式

css - 即使光标不在文本上,文本也会发光

javascript - getElementById 引用 Null(从 Javascript 调用)

java - 在第一级提取 jsoup 中的元素,无递归

javascript - 将密码输入从元素符号点更改为正方形

css - 在垂直菜单中水平居中链接图像

php - 隐藏 WooCommerce 中特定用户角色的增值税

css - 布局根据小部件中的帖子数量而变化