Home  >  Article  >  Web Front-end  >  About displaying ellipses when characters exceed width_html/css_WEB-ITnose

About displaying ellipses when characters exceed width_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:09:101037browse

I used this sentence to add overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100px;

but after adding the width, if only If there are 1 or 2 words, the back will be very empty, because there are other words after this div.
For example, it becomes like this: Confirm to delete Xiaobai? Is there any way to make the empty space disappear


Reply to the discussion (solution)

http://developer.51cto.com/art/201008 /221894.htm
Try =

This is the only way to increase the width

Statement:
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