how to leave the video without the transparent background? [closed]

0

I'm using a transparentbox with youtube videos inside it, how do I leave the videos without the transparent background?

my site

    
asked by anonymous 29.07.2017 / 19:30

1 answer

1

Given that <div> of youtube is within <div> transbox transparency is inherited, and gets maximum with 0.7 , which is what it has. This <div> youtube can thus be more transparent, but not more opaque.

A simple solution is to apply transparency through the background color with rgba , which gets the 3 color values and the last one for alpha which is the opacity.

Then this:

.transbox {
    ...
    background-color: #ffffff;
    opacity: 0.7;
}

It happens:

.transbox {
    ...
    background-color: rgba(255,255,255,0.7); //255,255,255 corresponde a branco
}

What causes <div class="youtube"> to contain <iframe> to be opaque because of the color it already assigns without opacity.

    
29.07.2017 / 19:56