如果“li.item:first”或“li.item:last”具有“活动”类,我如何隐藏上一个/下一个控制器
<ul class="carousel">
<li class="item active"><img src="ab.jpg" /></li>
<li class="item"><img src="cd.jpg" /></li>
<li class="item"><img src="ef.jpg" /></li>
<li class="item"><img src="gh.jpg" /></li>
</ul>
<!-- Controls -->
<a class="left carousel-control" href="#carousel" data-slide="prev">
<span class="icon-prev"></span>
</a>
<a class="right carousel-control" href="#carousel" data-slide="next">
<span class="icon-next"></span>
</a>