Home >Web Front-end >JS Tutorial >The specific code for text overflow is to implement the overflow part and put it into a newly generated div_javascript skills
I saw someone in the group asked a question about text overflow, how to put the overflow text into a newly generated div,
I thought about the principle, which is to judge whether it can be placed in the div, and if not , then insert it into a new div at the place where it should be disconnected. The code is as follows: