全宽vimeo包装背景

编程入门 行业动态 更新时间:2024-10-11 15:22:49
本文介绍了全宽vimeo包装背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图创建一个全方位的iframe vimeo背景覆盖的模式位于我的身体div。视频由重叠式广告覆盖,因此无法点击。我试图给视频100%的宽度和高度,但没有运气覆盖屏幕..我想让视频弹出500x250像素。

I am trying to create a full-width iframe vimeo background covered by a pattern located in my body div. The video is covered by an overlay so it becomes unclickable. Ive tried giving the video 100% width and height yet no luck on covering the screen.. I am trying to have the videos pop up at 500x250 px.

Html

Html

<div class="video"> <iframe src="//player.vimeo/video/82123812?title=0&amp;byline=0&amp;portrait=0&amp;color=3a6774&amp;autoplay=1&amp;loop=1" width="960" height="540" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <div class="overlay"></div> </div>

CSS

.video { position: absolute; left: 0; top: 0; width: 100%; height: 100% } .video .overlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: url(../img/overlay-pattern.png) repeat; }

推荐答案

和iframe的高度及其包装器。我也添加了一些z指数运气!

You need to set the width and height of the iframe as well as its wrapper. I've also added some z-indexes for luck!

嘿diddle diddle,这里是一个小提琴: http ://jsfiddle/n28Ef/1/

Hey diddle diddle, here is a fiddle: jsfiddle/n28Ef/1/

.video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; } .video iframe { position: absolute; z-index: 1; width: 100%; height: 100%; } .video .overlay { position: absolute; z-index: 2; left: 0; top: 0; width: 100%; height: 100%; background: url(../img/overlay-pattern.png) repeat; }

更多推荐

全宽vimeo包装背景

本文发布于:2023-11-23 04:12:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1620043.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:背景   vimeo

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!