gpt4 book ai didi

html - 水平滚动不显示图像

转载 作者:行者123 更新时间:2023-11-28 15:12:15 25 4
gpt4 key购买 nike

这是我第一次在这里发帖,大家好!

我几乎已经设置了一个成功的水平滚动,但滚动位于页面底部,水平滚动的滚动没有显示 as shown in this picture:HTML:

                    <article class="main-container grid_5 column">
<!-- Main Container -->
<aside class="category-row">
<ul class="product-listing">
<li>
<img class="main-container-images" src="assets/Placeholder_200x200.png" />
</li>
<li>
<img class="main-container-images" src="assets/Placeholder_200x200.png" />
</li>
<li>
<img class="main-container-images" src="assets/Placeholder_200x200.png" />
</li>
<li>
<img class="main-container-images" src="assets/Placeholder_200x200.png" />
</li>
<li>
<img class="main-container-images" src="assets/Placeholder_200x200.png" />
</li>
<li>
<img class="main-container-images" src="assets/Placeholder_200x200.png" />
</li>
</ul>
</aside>
</article>

CSS:

nav li {
display:inline;
}

li {
list-style: none;
}

.main-container-images {
width:150px;
}

.main-container li {
display: inline;
white-space: nowrap;
}

.category-row {
height: 175px;
overflow: scroll;
overflow-y: hidden;
}

ul.product-listing {
overflow-x: visible;
overflow-y: hidden;
}
li.product-listing {
display: inline-block;
}

最佳答案

您可以将显示设置为tabletable-cell

你需要担心的两个类是这两个:

ul.product-listing {
display:table;
overflow-x: visible;
overflow-y: hidden;
}
li.product-listing {
display: table-cell;
}

基本上,您需要将 ul 元素设置为 display:table,将 li 元素设置为 display:table-cell

有关更多信息,您可以查看此答案:https://stackoverflow.com/a/20640664/6739517

关于html - 水平滚动不显示图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48088535/

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