Home > Web Front-end > HTML Tutorial > 怎么样让几个文字不要折行显示呢?_html/css_WEB-ITnose

怎么样让几个文字不要折行显示呢?_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:33:32
Original
1113 people have browsed it


如图,我显示一段摘要的时候,后面会加上“显示所有”的链接,有时候这四个字会这行,就像图片里面的这样。
我希望如果能够显示在一行的时候 就显示在一行  如果四个字不能同时显示在这行上  就集体换行一起显示  请问怎么实现呢


回复讨论(解决方案)

.mydiv a{
  white-space:nowrap;
}

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template