.container
{
position: absolute;
bottom: 0px;
height: 25px;
left: 200px;
padding-right: 5px;
background-color: black;
overflow: hidden;
}
.child
{
position: relative;
float: left;
height: 100%;
width: 95px;
background-color: #99CCFF;
margin-left: 5px;
}
当浏览器窗口大小比所有子元素的宽度加起来还小,无法容纳不换行时,我希望出现滚动条而不是子元素默认换行的机制。
我无法控制子元素的数量,因此无法在容器上设置宽度。如何防止子元素换行?