# 方法一:flex
父{
width:xxx;
displaty: flex;
flex-wrap: nowrap;
overflow: scroll;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
-moz-overflow-scrolling: touch;
}
子{
flex: 1 0 auto;
}
# 方法二:inline
父{
width:xxx;
displaty: inline;
white-space: nowrap;
overflow: scroll;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
-moz-overflow-scrolling: touch;
}
子{
display: inline-block;
}