title | slug |
---|---|
<nobr> |
Web/HTML/Element/nobr |
{{HTMLSidebar}}{{deprecated_header}}
HTML <nobr>
元素阻止文本自动拆分成新行,所以它展示为长的一行,可能还需要滚动。这个标签不是标准的 HTML,并且不应该使用。反之应该使用 CSS 属性 {{Cssxref("white-space")}},像这样:
<span style="white-space: nowrap">Long line with no breaks</span>
- {{Cssxref("white-space")}}
- {{Cssxref("overflow")}}
{{HTMLSidebar}}