只是jumbotron的不透明度

Esp*_*enG 7 html css twitter-bootstrap

我想将jumbotron设置为0.5不透明度.

    <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>
Run Code Online (Sandbox Code Playgroud)

有没有办法在jumbotron而不是桌子上做到这一点?

Vic*_*tor 15

使用RGBa

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

第二行(0.5)的最后一个值是不透明度.

为清楚起见,这不适用于ie8或更低版本,因为不支持rgba.