Usually when we read the title of an article and encounter too many characters, we intercept a certain number of characters on the SERVER side through the program, and then add... to achieve the title length interception. In fact, we can also control it through CSS.
The actual columns are as follows:
.title
{
width:200px;
white-space:nowrap;
word-break:keep-all;
overflow:hidden;
text-overflow:ellipsis;
}
Can be referenced by span or div, for example:
<span class=title>The client solves the problem of the title displaying being too long, omitting the extra parts and adding ellipses</span>
<div class=title>The client solves the problem of the title displaying being too long, omitting the extra parts Style with ellipsis </div>
The above two examples are displayed after exceeding the 200px width defined by the style, and the following characters will be replaced by...