出于样式的原因,我使用带有伪类的ol元素.不幸的是,我无法从所需的索引开始计算列表项.怎么了?
HTML
<ol start="14">
<li>car</li>
<li>flower</li>
<li>garden</li>
<li>shool</li>
<li>river</li>
</ol>
Run Code Online (Sandbox Code Playgroud)
CSS
ol {
width: 850px;
padding: 0;
margin: 0 auto;
counter-reset: item;
list-style-type: none;
font-size: 18px;
line-height: 23px;
font-weight: 400;
font-style: normal;
}
li:before {
content: counter(item)" ";
counter-increment: item;
}
Run Code Online (Sandbox Code Playgroud) 我想选择td和th的table.目前我只能选择td 或 th.我该如何缩短它?
$table.find('tr th:nth-child(' + colIndex + ')').css('color', 'red');
$table.find('tr td:nth-child(' + colIndex + ')').css('color', 'red');
Run Code Online (Sandbox Code Playgroud)