【问题标题】:Change the paginator links with the angular-ui bootstrap carousel?使用 angular-ui 引导轮播更改分页器链接?
【发布时间】:2013-07-30 20:31:51
【问题描述】:

我正在使用 angular-ui 引导轮播,并想用图像更改左右导航链接。似乎在 tpl 中它们被硬编码为 ‹ 和 ›

在不更改实际 angular-ui 引导文件的情况下将这些更改为图像是否有任何建议?我想将其保存在库中,并且不想在每个版本发布后更改它。

我唯一的解决方案是在 CSS 中使这些尖括号的控件变得超级小,这样它们就无法被看到并放置图像。

.carousel-control {
  font-size: 1px
}

.carousel-control.left, carousel-control.right {
  background: url(/path/to/[image-here].png) no-repeat !important;
}

有没有更好的解决方案?

【问题讨论】:

    标签: carousel angular-ui-bootstrap


    【解决方案1】:

    http://angular-ui.github.io/bootstrap/ 项目的目标是拥有可自定义的模板,因此如果您不喜欢默认标记,可以将其换成自己的。如果您想更改轮播的外观和感觉,我建议您覆盖默认模板 (https://github.com/angular-ui/bootstrap/tree/master/template/carousel)。

    您可以轻松地覆盖单个模板而不会弄乱,而无需触及此处所述的项目可交付成果:https://stackoverflow.com/a/17677437/1418796

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-10-26
      • 1970-01-01
      • 2016-03-05
      • 1970-01-01
      • 2014-12-31
      • 2015-09-12
      • 1970-01-01
      • 2018-11-23
      相关资源
      最近更新 更多