为 table 列名称设置大小
set size for table column name
我有一个 table,其中有一些列,现在我想设置列名称的大小。现在默认变小了。
这是我的专栏名称---
<tr class="something">
<th> Name </th>
<th>Phone</th>
</tr>
脚本不起作用----
<script>
$(".something") th {
font - size: 2em; /* em is relative to the parent font size */
font - weight: bold;
}
</script>
现在使用 bootstrap 或基本 html 我如何设置列名称 粗体和大 。
我知道有成千上万的解决方案可以解决这个问题,虽然我想知道它是如何解决的。
任何人都知道如何解决这个问题。提前致谢。
使用 font-size
和 font-weight
将列名称加粗。
// Alternate jQuery Solution since you use Twitter Bootstrap
var header = $('.something th');
header.css('font-size', '2em');
header.css('font-weight', 'bold');
/* Simple CSS Solution */
.something th {
font-size: 2em; /* em is relative to the parent font size */
font-weight: bold;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table>
<tr class="something">
<th>Name</th>
<th>Phone</th>
</tr>
</table>
我有一个 table,其中有一些列,现在我想设置列名称的大小。现在默认变小了。
这是我的专栏名称---
<tr class="something">
<th> Name </th>
<th>Phone</th>
</tr>
脚本不起作用----
<script>
$(".something") th {
font - size: 2em; /* em is relative to the parent font size */
font - weight: bold;
}
</script>
现在使用 bootstrap 或基本 html 我如何设置列名称 粗体和大 。
我知道有成千上万的解决方案可以解决这个问题,虽然我想知道它是如何解决的。
任何人都知道如何解决这个问题。提前致谢。
使用 font-size
和 font-weight
将列名称加粗。
// Alternate jQuery Solution since you use Twitter Bootstrap
var header = $('.something th');
header.css('font-size', '2em');
header.css('font-weight', 'bold');
/* Simple CSS Solution */
.something th {
font-size: 2em; /* em is relative to the parent font size */
font-weight: bold;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table>
<tr class="something">
<th>Name</th>
<th>Phone</th>
</tr>
</table>