我试图让我的background-image
适应我的视频,每当我尝试将它放大时顶部被切断,我似乎无法让它真正适合我的视频视频,看起来不错。
我希望图片成为我视频的边框。我很确定它与视频div旁边的图像有关,但我可能会弄错。任何帮助赞赏!
HTML:
<div class="videos">
<div id="video1">
<iframe width="450" height="315" src="https://www.youtube.com/embed/vr0dXfQQfNU" frameborder="0" allowfullscreen></iframe>
</div>
<div id="video2">
<iframe width="450" height="315" src="https://www.youtube.com/embed/fevkx229XBs" frameborder="0" allowfullscreen></iframe>
<!--h <img src="images/vidborder2.png" class="vidborder2">-->
</div>
</div>
CSS:
div#video1 {
float: right;
background-image: url(images/vidborder.png);
background-repeat: no-repeat;
display: table-cell;
vertical-align: middle;
text-align: center;
}
div#video2 {
background-image: url(images/vidborder2.png);
background-repeat: no-repeat;
display: table-cell;
vertical-align: middle;
text-align: center;
background-size: 80%;
background-position: center;
}
.videos {
margin-top: 40px;
}