Firefox 滚动元素中的文本总是省略号
Text always ellipsis in a scrolled element in Firefox
我遇到滚动元素中的文本总是省略号的问题。
当我使用:
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Firefox 省略所有项目。不管锚点有display: list-item
,还是父display: flex, flex-direction: column
。 Chrome 一切正常。
chrome 和 firefox 的区别很明显。
我准备codesandbox:
https://codesandbox.io/s/gifted-glade-6kbcq?file=/index.html
知道如何解决吗?
这是https://bugzilla.mozilla.org/show_bug.cgi?id=764076。 Chrome在其他情况下也有类似的bug。
可靠的解决方法是使用 overflow-y: scroll
。
我遇到滚动元素中的文本总是省略号的问题。
当我使用:
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Firefox 省略所有项目。不管锚点有display: list-item
,还是父display: flex, flex-direction: column
。 Chrome 一切正常。
chrome 和 firefox 的区别很明显。
我准备codesandbox: https://codesandbox.io/s/gifted-glade-6kbcq?file=/index.html
知道如何解决吗?
这是https://bugzilla.mozilla.org/show_bug.cgi?id=764076。 Chrome在其他情况下也有类似的bug。
可靠的解决方法是使用 overflow-y: scroll
。