我想使這個(gè)用戶界面(兩行) 每個(gè)元素都有自己的寬度和滾動(dòng)
我發(fā)現(xiàn)了一些像這樣的鏈接 https://code sandbox . io/s/flex-horizontal-scroll-with-wrap-max-2-rows-d 7 ZJ 3m?file=/src/App.js:77-84
但是我想做的命令是
如何用css做出這個(gè)ui?
"溢出-x & quot;就是水平滾動(dòng)div,但是沒(méi)有& quot沒(méi)有包裝& quot
.container{
background: lightblue;
width: 30%;
height:50px;
overflow-x: scroll;
white-space: nowrap;
}
button{
margin: 2px;
height: 20px;
}
<!DOCTYPE html>
<html>
<title>HTML Tutorial</title>
<body>
<div class="container">
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<br>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
<button>CSS</button>
</div>
</body>
</html>