jquery - Apply Grid-Overlay to Image and Video -


i have following issue:

  • i want add overlay videos , images.
  • the overlay based on png-pixel.
  • i want cover whole width , height of images , cideos repeating png-pixel

    [1]: https://i.stack.imgur.com/ljbrb.png <- pixel

here example result: https://theuprisingcreative.com/video/

        * {  	box-sizing: border-box;  	margin: 0;  	padding: 0;  }                    .row {              clear: both;          }                    .spalten-6 {              width: 49.99992%;          }            .spalten-12 {              width: 100%;          }                    .spalten-6,  .spalten-12           { float:left;}                .img-box img {              width: 100%;          }                    .img-box {              border-left: 2px solid white;              border-top: 2px solid white;          }              #video-container {      position: relative;      height:300px  }  #video-container {      top:0%;      left:0%;      height:100%;      width:100%;      overflow: hidden;    }  video#bgvid {      position:absolute;      z-index:-1;      background: url('http://ewallpaperhub.com/wp-content/uploads/2015/01/nature-wallpaper-3.jpg') no-repeat;      background-size: cover;      transition: 1s opacity;  }  video#bgvid.fillwidth {      width: 100%;     position:relative  }
<div id="video-container">  <video id="bgvid" loop class="fillwidth" autoplay>  <source src=http://bigcom.com/assets/2014/08/ichooseb.mp4 type=video/mp4>  </video>   </div>      <div id="underneath">     <p style="color:#000">content underneath</p>      </div>       <div class="row">     <div class="spalten-6">        <div class="img-box">       <img src="images/fargo-jamie-lee-video-clip.png" alt="">         </div>     </div>     <div class="spalten-6">         <div class="img-box">         <div class="overlay">       <img src="images/la-bomba-video-clip.jpg" alt="">         </div>         </div>     </div>      </div>

thanks lot help!

i able achieve desired result using css gradient background on pseudo-element element #video-container.

for example, if add:

background: linear-gradient(45deg, rgba(0, 0, 0, 0.0980392) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.0980392) 75%, rgba(0, 0, 0, 0.0980392) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.0980392) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.0980392) 75%, rgba(0, 0, 0, 0.0980392) 0), transparent; 

and prefixed versions #video-container:after, following working example:

* {    box-sizing: border-box;    margin: 0;    padding: 0;  }    .row {    clear: both;  }    .spalten-6 {    width: 49.99992%;  }    .spalten-12 {    width: 100%;  }    .spalten-6,  .spalten-12 {    float: left;  }    .img-box img {    width: 100%;  }    .img-box {    border-left: 2px solid white;    border-top: 2px solid white;    position:relative  }    #video-container {    position: relative;    height: 300px  }    #video-container {    top: 0%;    left: 0%;    height: 100%;    width: 100%;    overflow: hidden;    position: relative; font-size:0;  }    #video-container:after, .img-box:after {    position: absolute;    top: 0;    left: 0;    content: "";    width: 100%;    height: 100%;    background: -webkit-linear-gradient(45deg, rgba(0, 0, 0, 0.0980392) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.0980392) 75%, rgba(0, 0, 0, 0.0980392) 0), -webkit-linear-gradient(45deg, rgba(0, 0, 0, 0.0980392) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.0980392) 75%, rgba(0, 0, 0, 0.0980392) 0), transparent;    background: -moz-linear-gradient(45deg, rgba(0, 0, 0, 0.0980392) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.0980392) 75%, rgba(0, 0, 0, 0.0980392) 0), -moz-linear-gradient(45deg, rgba(0, 0, 0, 0.0980392) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.0980392) 75%, rgba(0, 0, 0, 0.0980392) 0), transparent;    background: linear-gradient(45deg, rgba(0, 0, 0, 0.0980392) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.0980392) 75%, rgba(0, 0, 0, 0.0980392) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.0980392) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.0980392) 75%, rgba(0, 0, 0, 0.0980392) 0), transparent;    -webkit-background-size: 1px 1px;    background-size: 1px 4px;  }    video#bgvid {    position: absolute;    z-index: -1;    background: url('http://ewallpaperhub.com/wp-content/uploads/2015/01/nature-wallpaper-3.jpg') no-repeat;    background-size: cover;    transition: 1s opacity;  }    video#bgvid.fillwidth {    width: 100%;    position: relative  }
<div id="video-container">    <video id="bgvid" loop class="fillwidth" autoplay>  <source src=http://bigcom.com/assets/2014/08/ichooseb.mp4 type=video/mp4>  </video>  </div>    <div id="underneath">    <p style="color:#000">content underneath</p>  </div>    <div class="row">    <div class="spalten-6">      <div class="img-box">        <img src="http://img.clubic.com/00466352-photo-cadre-philips-affichage-16-9.jpg" alt="">      </div>    </div>    <div class="spalten-6">      <div class="img-box">        <div class="overlay">          <img src="http://www.photographycorner.com/galleries/data/2882/aspect4.jpg" alt="">        </div>      </div>    </div>  </div>

you can control "pixel" size , color using property background-size on pseudo-element #video-container:after. can control opacity entire grid , adjust liking without affecting video.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -