is there a way to fire a event when vertical overflow is detected in a div?

前端 未结 4 964
一向
一向 2021-01-15 15:19

the html of my page looks like this:

         


        
4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-15 16:07

    Let us be clear with the following definitions.

    View - Viewable area or the box containing the content

    content - The overflown content.

    To detect overflow check for the difference between the view.offsetHeight and the content.offsetHeight and your overflown content is this subtracted value.

提交回复
热议问题