<link href="css/bootstrap.min.css" rel="stylesheet">
<style>
table {
table-layout: fixed;
word-wrap: break-word;
width: 30%;
}
</style>
</head>
<body>
<table>
<tr>
<td colspan="2">abc</td>
</tr>
<tr class="table table-bordered">
<td style="width: 10%;" /td>1</td>
<td style="width: 20%;" /td>2</td>
</tr>
</table>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
答案 0 :(得分:4)
<html>
<head>
<link href="css/bootstrap.min.css" rel="stylesheet">
<style>
table {
width: 100%;
border:1px solid;
}
td{
border:1px solid;
}
</style>
</head>
<body>
<table>
<tr>
<td colspan="2">abc</td>
</tr>
<tr >
<td style="width: 40%;">1</td>
<td style="width: 60%;">2</td>
</tr>
</table>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
我现在已经改变了,注意我已经取消了表格布局:固定标签并且它起作用了