如何在一个小的容器中放置横向的多个容器
2017-12-19 本文已影响0人
魔王恩
主要的是container哪里有宽度没高度,所有它的高度为0 ,无法展示
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
Document
.box{
width:200px;
height:100px;
background-color:pink;
overflow-x:scroll;
overflow-y:hidden;
}
.container{
width:10000px;
}
.container div{
width:150px;
height:100px;
float:left;
}
.box1{
background-color:#fff;
}
.box2{
background-color:green;
}
.box3{
background-color:palegreen;
}
.box4{
background-color:yellow;
}