这<tr>
没有考虑后代的高度<span>
并且一些文本溢出到下一行。如何使该行扩展以包含文本和标题?
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.green-red.min.css">
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
<table class="mdl-data-table">
<tbody>
<tr>
<td class="mdl-data-table__cel--non-numeric">
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect">
<input type="checkbox" class="mdl-checkbox__input" />
<span class="mdl-checkbox__label">
<p class="mdl-typography--body-1 mdl-typography--text-left">Barack H. Obama</p>
<p class="mdl-typography--caption mdl-typography--text-left">Democratic</p>
</span>
</label>
</td>
</tr>
</tbody>
</table>
最佳答案
关于html - <tr> 不取后代 <span> 的高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42258932/