HTML5 iFrame Seamless Attribute

后端 未结 10 1098
日久生厌
日久生厌 2020-11-27 14:41

in HTML5 the iframe has new attributes like \'seamless\' that should remove borders and scrollbars. I\'ve tried it but doesn\'t seem to work, I still can see scrollbars and

10条回答
  •  情书的邮戳
    2020-11-27 15:27

    I couldn't find anything that met my requirements, hece I came up with this script (depends on jQuery):

    https://gist.github.com/invernizzie/95182de86ea9dc5daa80

    It will resize the iframe to the viewport size (taking into account wider content). It could use an improvement to use the viewport height instead of the content height, in the case that the former is bigger.

提交回复
热议问题