运用boorstrap的轮播图,怎么样根据自己的需求把轮播图的左右箭头和小圆点换成小方块

在项目中运用了boorstrap的轮播图,而他的左右箭头和小圆点的样式却不是想要的,要怎么去替换它们呢?试了好多种方法,百度了好久,还没有找到办法,请大伙们帮帮忙……

阅读 5.4k
3 个回答

需要替换的无非就是这个class罢了,但是需要注意的事,你需要全局搜索这个class,也把跟这个class绑定的事件改成你想要的图标对应的class。

clipboard.png

  <!-- Controls -->
  <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>

把这里的glyphicon-chevron-rightglyphicon-chevron-left替换掉,可以在这里找Glyphicons 字体图标;
或者在直接放图片什么的在a链接下面。

打开cmder git clone git@github.com:twbs/bootstrap.git 更改sass文件 重新生成bootstrap.min.css 想怎么用就怎么用 jq也可以这样干 就按自己的来咯

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题