Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opacity on just jumbotron

I want to set the jumbotron to 0.5 opacity.

    <div class="jumbotron">
         <table id="white" class="table table-condensed" id="table">
           <tbody>
           <tr>
             <td>En</td>
             <th>1</th>
           </tr>
           <tr>
            <td>To</td>
            <th>2</th>
           </tr>
           </tbody>
         </table>
    </div>

Is there a way to do this on just the jumbotron and not the table?

like image 419
EspenG Avatar asked Apr 30 '14 09:04

EspenG


People also ask

How do I change the jumbotron background in Bootstrap?

Jumbotron background color can be easily override using custom style tag which we have use inside our DIV tag. Just define style=”background-color:#00F3FF” inside your DIV and it will override the default background color and set your new color choice.

Does Bootstrap still have jumbotron?

In Bootstrap 5 the jumbotron component is removed in favor of utility classes like . bg-light for the background color and .


1 Answers

Use RGBa

.jumbotron {
   background: rgb(200, 54, 54); /* This is for ie8 and below */
   background: rgba(200, 54, 54, 0.5); 
}

Last value on the second line (0.5) is the opacity.

For clarity this won't work on ie8 or below as rgba is not supported.

like image 68
Victor Avatar answered Nov 04 '22 23:11

Victor