CSS text-overflow--how to make redundant text not displayed or represented by ellipsis

This effect is mainly used for processing titles that are too long.
But the friends will say that even if we add text-overflow, it will have no effect. I will explain it to you below.


This is the case when there is no text-overflow attribute.


1. text-overflow: The secondary attribute has no effect when used alone, and also has no effect when the wrong label is used. Usually used inside a div.
2, text-overflow, overflow,; white-space, width; four elements are used together.
3. text-overflow: clip; overflow: hidden; white-space: nowrap; width100px; This effect is redundant removal.
    The effect is as follows:
4. text-overflow: ellipsis; overflow: hidden; white-space: nowrap; width 100px; this effect is redundant and replaced with ellipses.
    The effect is as follows:

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325819162&siteId=291194637