加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.html 1.93 KB
一键复制 编辑 原始数据 按行查看 历史
yequanrui 提交于 2023-04-05 04:22 . update
<!doctype html>
<html lang="zh">
<head>
<meta charset="utf-8">
<title>Confession</title>
<base target="_blank">
<meta name="description" content="Confession">
<meta name="keywords" content="Confession">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="google-site-verification" content="pLPl8oqL0Adf4p5s9zT-pXnpfF-2TMlOTEjoDl7DpSY" />
<meta name="baidu-site-verification" content="code-gZR6EVVpaO" />
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="css/swiper.min.css" />
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<!-- Swiper -->
<section class="pc-banner">
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide swiper-slide-center none-effect">
<a href="dist/01/index.html"><img src="img/01.jpg" /></a>
</div>
<div class="swiper-slide">
<a href="dist/02/index.html"><img src="img/02.jpg" /></a>
</div>
</div>
</div>
<div class="swiper-pagination"></div>
<div class="button">
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>
</section>
<!-- Swiper JS -->
<script src="js/swiper.min.js"></script>
<!-- Initialize Swiper -->
<script>
window.onload = function () {
var swiper = new Swiper(".swiper-container", {
autoplay: 3000, //是否自动滚动
speed: 1000, //滚动速速
autoplayDisableOnInteraction: false,
loop: true,
centeredSlides: true,
slidesPerView: 2, //当前选中
pagination: ".swiper-pagination",
paginationClickable: true,
prevButton: ".swiper-button-prev", //左右切换
nextButton: ".swiper-button-next", //左右切换
onInit: function (swiper) {
//当前选中 状态
swiper.slides[2].className = "swiper-slide swiper-slide-active"; //第一次打开不要动画
},
breakpoints: {
668: {
slidesPerView: 1,
},
},
});
};
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化