Use jQuery to Detect Container Overflow?

前端 未结 5 842
萌比男神i
萌比男神i 2020-12-01 13:34

I\'ve seen this question but feel like there has to be a \"cleaner\" jQuery method of doing this. I\'m not even sure if this really works in all scenarios. Is there a way fo

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-01 14:07

    There is no clean method. You could make it two wrappers, the outer wrapper having overflow: hidden, and comparing the two wrappers' dimensions, but anything you could possibly do would end up being hacky. If the functionality really is necessary, then you'll have to live with the hacks.

提交回复
热议问题