The problem that the text in the div in Html is too long and does not wrap!

  1. The problem that the text in the div in Html is too long and does not wrap! [Sometimes the value in the div is not fixed by us. The string]
    returned from the back end is long or short, which may affect the layout of other div content. At this time, we need to specify the width (width), height ( height) set it to (auto), then add it to the style of the div[], height ( height) set it to (auto), then add it to the style of the div[]

word-wrap: break-word;
        word-break: break-all;
        overflow: hidden;

As shown in the figure:
After the setting is completed, if it is too long, the width will be occupied and the next line will be automatically changed.

Leave a Comment

Your email address will not be published. Required fields are marked *