iframe resizing with scrollheight in chrome/safari

后端 未结 3 2018
情歌与酒
情歌与酒 2020-12-01 11:06

I\'m trying to resize (make bigger or smaller) an iframe based on it\'s contents. After a click on each page a method is called which does the resizing.

In Chrome I

3条回答
  •  一整个雨季
    2020-12-01 11:30

    According to spec, Element.scrollHeight will round the value to an integer. If you need an accurate fractional value, use Element.getBoundingClientRect() instead.

提交回复
热议问题