Overlaying a transparent background on an embedded video

前端 未结 2 1539
面向向阳花
面向向阳花 2021-01-18 02:45

I\'ve a video which I\'ve embedded in a fullwidth div panel. I\'m trying to overlay a gradient on top of it, but I can\'t make it work. I\'ve tried adjusting z-index, wrappi

2条回答
  •  臣服心动
    2021-01-18 03:44

    I came across this very same issue and eventually managed to get an aesthetically similar effect simply setting the video with opacity:0.5 over a colored background.

    .vid-bg {
      opacity: 0.5; /* ! */
      position: fixed;
      right: 0;
      bottom: 0;
      min-width: 100%; 
      min-height: 100%
    }
    
        
    

提交回复
热议问题