Swiper History Navigation(历史导航) - replaceState

使用history.replaceState方法替换history.pushState方法

replaceState信息

类型:
boolean
默认:
false
举例:
true
启用版本:
4.0.0

效果演示

使用方法示例

从Swiper7开始,容器默认类名由'.swiper-container'变更为'.swiper'。
<script>
  var swiper = new Swiper('.swiper', {
    history: {
      replaceState: true,
    },
  });
</script>