Full-width vimeo wrapper background

后端 未结 2 700
独厮守ぢ
独厮守ぢ 2021-02-02 01:51

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 g

2条回答
  •  南方客
    南方客 (楼主)
    2021-02-02 02:08

    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!

    Hey diddle diddle, here is a fiddle: http://jsfiddle.net/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;
    }
    

提交回复
热议问题