Prevent wrapping of span or div

后端 未结 5 1365
-上瘾入骨i
-上瘾入骨i 2020-12-22 21:24

I\'d like to put a group of div elements of fixed width into a container and have the horizontal scroll bar appeared. The div/span ele

5条回答
  •  余生分开走
    2020-12-22 22:06

    As mentioned you can use:

    overflow: scroll;
    

    If you only want the scroll bar to appear when necessary, you can use the "auto" option:

    overflow: auto;
    

    I don't think you should be using the "float" property with "overflow", but I'd have to try out your example first.

提交回复
热议问题