Home > Enterprise >  How do I fill 100% iframe video to its parent?
How do I fill 100% iframe video to its parent?

Time:11-18

I want to embed vimeo video into my web project.

I made a fiddle.

https://jsfiddle.net/p9cbs2u5/

You can see the white gap horizontally. It's not cover 100% of parent. Perhaps the reason is the video has proper aspect ratio. How do I fill 100%? It's okay to video is cropped.

CodePudding user response:

Your iframe has the correct size. The problem is the way vimeo displays the video inside the iframe. By default the background of the player is transparent hence the white gap you see horizontally. Adding the &transparent=0 parameter to your video url should give you your desired result.

  • Related