Using Twitter Bootstrap to draw Panels. I have change the padding and background-color, and the round corners isn't get rendered anymore.
Example:
FIDDLE
<div class="panel-group">
<div class="panel panel-primary">
<div class="panel-heading">
<span class="panel-subtitle">Title</span>
</div>
<div class="panel-collapse collapse in">
<div class="panel-body">
<div class="col-md-12" style="padding: 0px;">
<table class="table table-striped" style="margin-bottom: 0px;">
<thead>
<tr>
<th>A</th>
<th>B</th>
<th>C</th>
<th>D</th>
<th>E</th>
<th>F</th>
<th>G</th>
</tr>
</thead>
<tbody>
<tr>
<td>ContentA</td>
<td>ContentB</td>
<td>ContentC</td>
<td>ContentD</td>
<td>ContentE</td>
<td>ContentF</td>
<td class="expand">
<p>Sub-title</p>
<div class="panel panel-primary">
<div class="panel-heading">
<span class="panel-title semquebra menor">Sub-sub-title</span>
</div>
<div class="panel-body menor">
<table class="table table-condensed">
<tr>
<td colspan="2">
Inner text
</td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
With CSS:
body{
padding: 20px;
background-color: #ffffff;
}
.panel-body {
padding: 1px; /*Works, but set it to 0 and it doesn't works*/
background-color: #ffffff;
border-radius: 4px;
}
In the Fiddle, you can see the outer panel doesn't have the inferior corners rounded if padding: 0px;
. Changing it to padding: 1px;
, works but I need 0px.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…