使表响应

时间:2016-06-18 14:04:56

标签: twitter-bootstrap-3 responsive

以下代码是一个表,我试图通过bootstrap 3使其响应, 我添加了class =" table"到表标签,但它没有工作。 我该怎么办?怎么了?

<div class="tab3_main" id="cs1">
 <table width="770" border="0" cellspacing="0" cellpadding="0">
   <tbody>
     <tr>
      <th height="50" colspan="3" align="left" scope="col">Camera</th>
     </tr>
     <tr> </tr>
     <tr> 
       <td width="135" align="left" class="td">Image Sensor:</td> 
       <td width="15" align="left" class="td1">|</td> 
       <td align="left" class="td2">1/3"&nbsp;Progressive&nbsp;Scan&nbsp;CMOS</td> 
    </tr>
    <tr> </tr>
    <tr> 
      <td width="135" align="left" class="td">Min. Illumination:</td> 
      <td width="15" align="left" class="td1">|</td> 
      <td align="left" class="td2">0.01Lux&nbsp;@(F1.2,AGC&nbsp;ON),&nbsp;0.028Lux&nbsp;@(F2.0,AGC&nbsp;ON),&nbsp;0&nbsp;Lux&nbsp;with&nbsp;IR</td> 
   </tr>
   <tr> </tr>
   <tr> 
      <td width="135" align="left" class="td">Shutter time:</td> 
      <td width="15" align="left" class="td1">|</td> 
      <td align="left" class="td2">1/3&nbsp;s&nbsp;~&nbsp;1/10,000&nbsp;s</td> 
  </tr>
  <tr> </tr>
  <tr> 
     <td width="135" align="left" class="td">Slow shutter:</td> 
     <td width="15" align="left" class="td1">|</td> 
     <td align="left" class="td2">Support</td> 
 </tr>
 <tr> </tr>
 </tbody>
</table>

1 个答案:

答案 0 :(得分:1)

你应该将“.table”包装在“.table-responsive”

<div class="table-responsive">
  <table class="table">
   ...
  </table>
</div>

使表格在bootstrap 3中响应。