内側のdivを配置したdivがあり、すべての内側のdivを一列に並べて水平スクロールバーを表示する必要があります(クレイジーに聞こえますが、それが必要です)。コンテナ幅の自動とオーバーフロースクロールを試しましたが、何もしませんでした。
それを達成する方法は?
私のマークアップ:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>text-overflow</title>
<style>
body{
width: auto;
}
#items{
overflow-x: scroll;
width: auto;
}
.item{
display: inline-block;
width: 400px;
height: 100px;
border:1px solid;
}
</style>
</head>
<body>
<div id="items">
<div class="item">
Item content
</div>
<div class="item">
Item content
</div>
<div class="item">
Item content
</div>
<div class="item">
Item content
</div>
<div class="item">
Item content
</div>
<div class="item">
Item content
</div>
</div>
</body>
</html>