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

The specific code for text overflow is to implement the overflow part and put it into a newly generated div_javascript skills

WBOY
Release: 2016-05-16 17:33:37
Original
1482 people have browsed it

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:

Copy the code The code is as follows:





Text is automatically inserted into different divs-Jason Yu








To add, possible problems 1. The symbol is in the next div The first one to appear is 2. Letters such as "student" will be broken and written, and other problems need to be judged by regular rules.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template