gpt4 book ai didi

html - 宽度 :auto in firefox is not working as intended

转载 作者:行者123 更新时间:2023-11-28 03:40:11 26 4
gpt4 key购买 nike

所以,我有一个包裹在 div 中的图像 (.indexWrap):

<div id = "slider">      
<div class="indexWrap">
<img class="indexImage" src="">
</div>
</div>

在名为 #slider 的 div 中通过 php 在页面加载时创建了其中的 8 个。我正在使用 smooth Div Scroll在主页上显示这些图像。在 Chrome 中一切看起来都很好,在 IE 8 和 9 中看起来也不错。问题出在 firefox 中。每个图像的 div.indexWrap 的自动宽度设置不正确。 div 似乎向右额外拉伸(stretch)了 200-300 像素。这是 CSS:

#slider{
position: relative;
top:50px;
width:100%;
height:275px;
}
div.scrollWrapper
{
position: relative;
overflow: hidden;
width: 100%;
height: 100%;
}

div.scrollableArea
{
position: relative;
width: auto;
height: 100%;
}
.indexWrap{
float:left;
position:relative;
width:auto;
height:100%;

padding-right:50px;
padding-left:50px;
}
img.indexImage{
float:left;
position:relative;
width:auto;
height:100%;
}

这里是有问题的实时版本的链接:jasone.co

编辑:最重要的是,在页面加载时,每个 div.indexWrap 都没有被正确填充,但是随着滚动的开始,下一个检索到的元素被正确地填充了,有点蹩脚。可能是这一切的原因。

最佳答案

尝试添加display: inline-block;

关于html - 宽度 :auto in firefox is not working as intended,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11534248/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com