How can I make youtube video responsive along with background image?

后端 未结 2 890
萌比男神i
萌比男神i 2021-02-06 19:45

I have responsive background and I want to have a YouTube video over that background(not in full width).

Here I have tried doing it.

http://jsfiddle.net/audetwe

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-06 20:42

    braican is correct, but the 56.25% on the video container will leave lots of padding after your video. Just wrap everything inside another div with a max-height of 320px and overflow:hidden to hide the extra padding;

提交回复
热议问题