html - 缺少水平滚动条

标签 html css horizontal-scrolling

我想要显示水平滚动条。我使用了 overflow-x:scroll; 但我没有看到任何水平滚动条。请帮忙。

<div class="abc">
  <p>This is overflow-x scroll. This is overflow-x scroll. This is overflow-x scroll.</p>
</div>
.abc{
  overflow-x:scroll;
  width:1000px;
}

我这里的代码是here

最佳答案

根据你在jsbin中的代码,试试这个:

.abc{
  overflow-x: auto;
  white-space: nowrap;
}

您可以根据需要保留其中一项“自动”或“滚动”。
还有许多其他属性值,请在此处查看:http://www.w3schools.com/cssref/pr_pos_overflow.asp

关于html - 缺少水平滚动条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39488655/

相关文章:

html - 占位符在 Firefox 中无法正常工作

jquery - 如何相对于另一个列表中的元素显示另一个列表中的元素?

html - 浏览器对带有 CSS 查询(如方向)的链接标记上的媒体属性的支持是什么?

javascript - 防止 iOS WebApp 中的水平滚动

html - 添加子菜单会破坏我的导航,有人吗?

html - 如何对齐两个 div 列之一

html - 一个 div 中的多个背景图像

html - 在 outlook 中缩放视网膜图像(不使用 img 属性)

html - 在以下情况下,如何在不使用 table into table 的情况下将水平滚动条添加到 HTML 表格的特定列?

android - 自动滚动到 Horizo​​ntalScrollView