小编use*_*372的帖子

ol不能从特定计数开始

出于样式的原因,我使用带有伪类的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)

html css

2
推荐指数
1
解决办法
67
查看次数

在jQuery中选择多个元素类型

我想选择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)

html javascript jquery

1
推荐指数
1
解决办法
50
查看次数

标签 统计

html ×2

css ×1

javascript ×1

jquery ×1