我的网站上有一张图片(左边),当你调整浏览器窗口的大小时,它没有反应。但是,一旦刷新图像,就会填满整个空间。有没有关于让它正确响应的想法?
网址: splitblog.squarespace.com
HTML
<figure class="content-fill main-image"><img {@|image-meta}></figure>CSS
.main-image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index:-1000;
}发布于 2014-04-12 00:27:31
我看到图像宽度是在图像元素上设置的,并且是通过js动态设置的。
你必须强制100%宽度的图像也。
.main-image img{
width: 100%!important;
}发布于 2014-04-12 01:17:50
.main-image img {
width: 953px !important;
height: 1430px !important;
}您已经弄乱了滚动条,更改为溢出
.side-right {
overflow-y: scroll;
}
body {
overflow: hidden;
}
@media screen and (max-width: 1000px) {
body {
overflow-y: scroll;
}
.side-right {
overflow: hidden;
}
}https://stackoverflow.com/questions/23017636
复制相似问题