我想知道如何使这张桌子居中?我很难集中注意力。我试过用 CSS 居中,但在我的 CSS 中放置标签时我可能做错了。我试过标签“table.tftable”
<style>
table {
-moz-border-radius: 5px !important;
border-collapse: collapse !important;
border: none !important;
}
table th, table td { border: none !important }
table th:first-child {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
table th:last-child {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
table tr:last-child td:first-child {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
table tr:last-child td:last-child {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
table tr:hover td { background-color: #2f2f2f !important }
<table id="tfhover" class="tftable" border="1">
<style type="text/css">
table.tftable {font-size:12px;color:#fbfbfb;width:100%;border-width: 1px;border-color: #686767;border-collapse: collapse;text-align:center;}
table.tftable th {font-size:12px;background-color:#171515;border-width: 1px;padding: 8px;border-color: #686767;text-align:center;}
table.tftable tr {background-color:#000000;}
table.tftable td {font-size:12px;border-width: 1px;padding: 8px;border-color: #686767;text-align:center;}
</style>
<table id="tfhover" class="tftable" border="1" style="width: 680px;">
bunch of content
</table>