本文介绍了white-space:nowrap在IE中在水平滚动框中不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用 white-space:nowrap
结合inline-block的元素来创建一个水平滚动框。由于某些原因,在IE中, white-space:nowrap
被忽略,项目被包装。
解决方案
找到了!我们使用 word-wrap:break-word
。在Internet Explorer中, word-wrap
似乎会干扰 white-space
修复此问题是在 white-space:nowrap
的元素上设置 word-wrap:normal
>
I'm using white-space: nowrap
combined with inline-block'd elements to create a horizontally scrolling box. For some reason, in IE, the white-space: nowrap
is being ignored and items are wrapping.
解决方案
Found it! We were using word-wrap: break-word
higher up. It seems that word-wrap
interferes with white-space
in Internet Explorer. Fix for this was to set word-wrap: normal
on the element with white-space: nowrap
.
这篇关于white-space:nowrap在IE中在水平滚动框中不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!