Html 使用浮动时,水平溢流不起作用

Html 使用浮动时,水平溢流不起作用,html,css,Html,Css,这是我的示例html代码 <div style="overflow-y: visible; overflow-x: scroll; width: 600px;"> <div style="width: 230px;float:left;">Some label</div> <div style="width: 230px;float:left;">Some label</div> <div style="width:

这是我的示例html代码

<div style="overflow-y: visible; overflow-x: scroll; width: 600px;">
  <div style="width: 230px;float:left;">Some label</div>
  <div style="width: 230px;float:left;">Some label</div>
  <div style="width: 230px;float:left;">Some label</div>
  <div style="width: 230px;float:left;">Some label</div>
  <div style="width: 230px;float:left;">Some label</div>
  <div style="width: 230px;float:left;">Some label</div>
</div>

一些标签
一些标签
一些标签
一些标签
一些标签
一些标签
这里的例子


我想显示所有的文字在单行和滚动条水平应出现。但从示例中,您可以看到它们以单行形式显示,但所有文本均未显示,而且滚动条也未按预期工作。

对于包装器使用
空白:nowrap
,对于元素使用
显示:内联块

<div style="overflow-y: hidden; overflow-x: scroll; width: 600px; height: 30px;white-space: nowrap;">
  <div style="width: 230px;display:inline-block;">Some label</div>
  <div style="width: 230px;display:inline-block;">Some label</div>
  <div style="width: 230px;display:inline-block;">Some label</div>
  <div style="width: 230px;display:inline-block;">Some label</div>
  <div style="width: 230px;display:inline-block;">Some label</div>
  <div style="width: 230px;display:inline-block;">Some label</div>
</div>

一些标签
一些标签
一些标签
一些标签
一些标签
一些标签