How can I cleanly resize an iFrame with dragging functionality?

前端 未结 4 2029
小蘑菇
小蘑菇 2021-01-15 02:20

I have an iFrame and I want the user to be able to grab one side of it and drag it to resize it. I don\'t want it to resize realtime, but rather use an indicator line and wh

4条回答
  •  耶瑟儿~
    2021-01-15 03:07

    Iirc, the classical method is to put the IFrame inside of a div and make that div re-sizable; also make the iFrame's width and height at 100%.

    If you're using JQuery though, can you not use jQuery.load('uri') instead of an iFrame ? I believe it's preferable in many situations.

提交回复
热议问题