WeChat applet text exceeds automatic line wrapping solution

Hits: 0

  • Usage scenario: In a piece of text, too much content is displayed, beyond the original setting range, and now it needs to be displayed in separate lines.
  • Implementation plan:
    • Premise view: textset default for or containerdisplay: block
    • Then set the properties:text-overflow:ellipsis; word-wrap:break-word;
    • Automatic line wrapping can be achieved.

20201123 Update

The numbers/letters in the view tag do not wrap, causing Chinese characters and other characters to be displayed on separate lines

Show results:

Number/letter without line wrapping effect:

solution:

view {
    word-break: break-all;
}

If it is because there is too much text in a large paragraph, and you need to achieve the effect of folding and unfolding, please move to [the WeChat applet with too much content in the large paragraph of text to achieve the solution of folding and unfolding effect.]

You may also like...

Leave a Reply

Your email address will not be published.