In the same sentence in Chinese and English, when the CSS control exceeds the width to display the ellipsis, the width calculated by the browser is incorrect.

controls the style of text:

.text {
    color: -sharp5E6574;
    font-size: 14px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    word-break: break-all;
}

question: the length of the text on line 5 is protruding.

because the browser width is dynamic to adapt, the following methods have been tried, but none of them can save the paragraph protruding from the left

.
  1. text width is set to width: 50%, the text width is smaller, but the one on the left is still protruding
  2. modifying the word-break sentence has no effect, even if it is not displayed at all, it is the same
  3. .
Mar.28,2021

use flex?
setting to exceed ellipsis requires a clear width.


what you want to change is the width of the whole block after 5

.
Menu