Twitter BootStrap Carousel为什么在url末尾添加了#标签

Max*_*Max 6 jquery carousel twitter-bootstrap

我正在使用Carousel(滑块),当我点击下一个和上一个按钮时,它添加了标签#cptbc_105在url的末尾我想删除这个,旋转木马小跳,我不知道为什么这个发生的页面上升当我点击下一个按钮.

这是网址:http: //goo.gl/m3BlBU

请帮帮我,谢谢.

小智 13

似乎"cptbc_105"是你的旋转木马的id.页面URL更改是因为您在左右按钮上使用了href ="#cptbc_105".只需将"href"attr更改为"data-target"attr,并且每次操作都能正常工作.

更改:

<a class="right carousel-control" href="#cptbc_105" role="button" data-slide="next"> <span class="sr-only">Next</span> </a>

至:

<a class="right carousel-control" data-target="#cptbc_105" role="button" data-slide="next"> <span class="sr-only">Next</span> </a>