CSS:停止在ipad上包装无序列表中的文本
我有以下无序列表:CSS:停止在ipad上包装无序列表中的文本,css,ipad,Css,Ipad,我有以下无序列表: <ul> <li>some text</li> <li style="overflow:hidden;white-space: nowrap;">some long text</li> <li>other text</li> <li>more text</li> </ul> 然而,在ipad中,它显示如下: some text | some long |
<ul>
<li>some text</li>
<li style="overflow:hidden;white-space: nowrap;">some long text</li>
<li>other text</li>
<li>more text</li>
</ul>
然而,在ipad中,它显示如下:
some text | some long | other text | more text
text
如何防止li元素缠绕在ipad上
编辑:如果我在“一些长文本”的样式中添加较大的宽度,它将显示如下所示:
some text | some long | other text | more text
text
some text | some_long_text | other text | more text
如果我将文本更改为一些长文本(将其全部转换为一个单词),我会看到以下内容:
some text | some long | other text | more text
text
some text | some_long_text | other text | more text
因此,它似乎只是忽略了空白:nowrap;属性。@rOcKiNgRhO我尝试过,但li容器已展开,但文本仍被包装(请参见上面的编辑)。移除溢出:隐藏,不要添加任何固定宽度您可能希望添加li{width:auto;}以修复它。