4

Sorry if my tune is not good. I have this code of html

HTML:

<div class="video_bg"> ---- Some Code to execute ---</div>

CSS:

.video_bg{
  width:600px;
  height:600px;
  float:left;
  }

and have a video embed code this

<iframe src="//player.vimeo.com/video/71906867" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>

Question: Can i use this video as background of div "video_bg" by using any script or css.

BigTech
  • 460
  • 6
  • 11
  • 22

2 Answers2

4

You can easily use the jquery.videobackground plugin.

Read here: http://georgepaterson.github.io/jquery-videobackground/

Nick Schmidt
  • 1,427
  • 1
  • 13
  • 22
0

You mean that you want to place some texts images etc. on the background's video ?
If you mean something like this , you can do it by positioning your div's .
Something like this :

<div class="video_bg"><iframe src="//player.vimeo.com/video/71906867" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe><p class="text">Some text goes here</p></div>
.video_bg iframe{
width: 500px;
height:281px;
position: relative;
}
.text {
position:absolute;
font-size: 20px;
text-align:center;
}