How to find out if an element overflows (with jQuery)?

后端 未结 4 801
甜味超标
甜味超标 2020-12-31 03:57

The layout looks like this:

\"enter

Basically all I want is to find out if the

4条回答
  •  遥遥无期
    2020-12-31 04:44

    Have you tried using CSS to prevent it from happening?

    pre { word-wrap:break-word; }
    

    To iterate through every element on the page seems excessive, and it will take some time on a busy page. It is possible but not entirely practical.

提交回复
热议问题