Let me give you an idea. In HTML, add an inline-block (your expansion and closing) after the text. The css setting is fixed high, and overflow:hidden is exceeded. js determines the height, and adds a class to the outermost layer after exceeding it. This class controls your expansion and closing, and also clears the fixed height and overflow: hidden. Of course, if it is responsive, you have to think of another way.
Let me give you an idea. In HTML, add an inline-block (your expansion and closing) after the text. The css setting is fixed high, and overflow:hidden is exceeded. js determines the height, and adds a class to the outermost layer after exceeding it. This class controls your expansion and closing, and also clears the fixed height and overflow: hidden. Of course, if it is responsive, you have to think of another way.
angular filter
Use line-height to specify the height, and use this height to achieve folding and stretching