If you have some element actions that are tied to an iFrame, and your iFrame is being reloaded on page resize (in turn breaking your element actions) the solution is this: window. position: relative display: block width: 90 / width of iframe wrapper /. ![]() Ofcourse both width and height will resize to maintain the 16:9 ratio of an youtube movie. When an iFrame is moved around in the DOM, the document inside is reloaded.Īccording to some things I read online, a decade ago some developers added functionality to Webkit which would prevent iFrames from being reloaded when moved around in the DOM. With next html and css, the youtube will be as wide as the available space (in this css 90 of the available space). ![]() My only guess is that when the window is resized, Bubble is tossing around the iFrame in between nodes. I was able to make a responsive iframe size using vw on both width and height of the style element because I know the amount of horizontal width I want the elements to use and then I calculate the height based on the width and the knowledge that the video is 16:9.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |