gpt4 book ai didi

css - 使div大于容器

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

使用下面的代码,我正在尝试使“ThumbNails”与内容(动态)要求的一样大,如果不适合连续的 div,则(仅)显示水平滚动条,但我失败了。我做错了什么?

html:

<body>
<div id="Fascione"></div>
<div id="Wrapper">
<div id="Menu"></div>
<div id="Contenuto">
<div id="VariableImg"></div>
<div id="Back"></div>
<div id="Next"></div>
<div id="ThumbNails">
<img><img><img>
</div>
</div>
</div>
<div id="Footer"></div>
</body>

CSS:

body{width:1024px; margin:0px auto;}
div#Fascione{width:inherit;min-height:125px;border-bottom:2px solid black;}
div#Wrapper{width:inherit;padding:8px 0px 4px 0px;}
div#Wrapper{width:inherit;padding:8px 0px 4px 0px;}
div#Menu{float:left;width:200px;}
div#Contenuto{overflow:hidden;margin-left:208px;}
div#Back, div#Next{width:49%;cursor:pointer;text-align:center;margin:1% auto;border:1px dotted #1111cc;background-color:#ffffff;}
div#Back{float:left;}
div#Next{float:right;}
div#Back:hover, div#Next:hover{border:1px solid #1111cc;}
div#ThumbNails{clear:both;max-height:180px;overflow-x:auto;overflow-y:hidden;background-color:#f0f0f0;}
div#Footer{clear:left;width:inherit;} /* clear left needed in combination with the overflow:hidden of Contenuto */

已编辑:删除旧的无效链接。

最佳答案

正如@My Head Hurts 所指出的,正确的答案是添加 white-space:nowrap;

关于css - 使div大于容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9455812/

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