I am trying to achieve an auto-resize feature for my frame's height when the screen width is smaller than a certain value. I want it to behave like Sketchfab, as demonstrated in this video: http://www.youtube.com/watch?v=_y5ckVFGHKU&feature=youtu.be
Currently, here is my progress:
// JavaScript code goes here
To embed it on my webpage, I use an iframe:
<iframe src="/full/1.html" width="80%" height="450" allowfullscreen="allowfullscreen" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>
The issue I'm facing is that when I resize the frame's height smaller, it leaves a gap.
Here is a screenshot of the problem:
https://i.sstatic.net/IEOz2.jpg
Can anyone guide me on how to resize the frame's height smaller when the width reaches a limit without leaving any empty space like Sketchfab does?
Thank you!