How to resize iframe when parent window resizes

前端 未结 4 1325
忘掉有多难
忘掉有多难 2021-01-31 20:35

I don\'t think this is not another \"resize iframe according to content height\" question.

I actually want to resize the iframe dynamically according to a resize of the

4条回答
  •  攒了一身酷
    2021-01-31 21:00

    You can set the width and height of the iframe element to be percentage-based. Here's an example where width is 75% and will dynamically change when you increase/decrease the width of your browser window: http://jsfiddle.net/fallen888/pkjEB/

提交回复
热议问题