I have the following image:
Now I want to place the video in this image with a responsive look:
For this, I use the following css and html code:
html code:
<div class="vimeo">
<article>
<figure>
<iframe src="https://player.vimeo.com/video/211148482?autoplay=1&title=0&byline=0&portrait=0" width="568" height="453" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</figure>
</article>
</div>
CSS code:
.vimeo {
font: 16px/1.4 Georgia, Serif;
width: 45%;
margin: 1px auto;
background: url(images/bg.jpg);
background-size: contain;
background-repeat: no-repeat;
position: relative;
}
pre, article style, article script {
white-space: pre;
display: block;
overflow-x: auto;
}
img {
max-width: 100%;
}
figure {
display: block;
}
figcaption {
display: block; text-align: center; orphans: 2;
}
Now it looks like this:
I want to set it on a gray background image. How can i do this?
source
share