我尝试获取具有显示块属性的 id slide-1,然后将一个类添加到活动的 id pagecount-1... 我试图为每张幻灯片获取显示为活动的指示器,这就是我所拥有的:
<div id="slider">
<div class="sp active" id="slide-1" style="display: block"></div>
<div class="sp" id="slide-2" style="display: none"></div>
<div class="sp" id="slide-3" style="display: none"></div>
<div class="sp" id="slide-4" style="display: none"></div>
</div>
<div id="page">
<div id="page_count-1" class="indicate"></div>
<div id="page_count-2" class="indicate"></div>
<div id="page_count-3" class="indicate"></div>
<div id="page_count-4" class="indicate"></div>
</div>