DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> WEB網站前端 >> 網頁特效代碼 >> 移動端幻燈片jQuery手機觸屏滑動切換
移動端幻燈片jQuery手機觸屏滑動切換
編輯:網頁特效代碼     

全屏效果展示

卡片效果展示

自動播放效果展示

HTML文件代碼:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery手機觸屏滑動切換幻燈片 - 何問起</title><base target="_blank" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">

<!-- Link Swiper's CSS -->
<link rel="stylesheet" href="http://hovertree.com/texiao/jquery/78/dist/css/swiper.min.css">

<!-- Demo styles -->
<style>
html, body {
position: relative;
height: 100%;
}
body {
background: #eee;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
font-size: 14px;
color:#000;
margin: 0;
padding: 0;
}
.swiper-container {
width: 100%;
height: 100%;
}
.swiper-slide {
text-align: center;
font-size: 18px;
background: #fff;

/* Center slide text vertically */
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}
.swiper-container a{color:blue;display:inline-block;margin:2px;}
</style>
</head>
<body>
<!-- Swiper -->
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">Slide 1<br />
請點擊箭頭,<br />或者按住左右拖動,<br />或者點擊下發圓點,<br />切換到需要的卡片上。
<br />何問起<br /><br /><a href="1.htm">卡片效果</a>
</div>
<div class="swiper-slide"><a href="http://hovertree.com/hvtimg/"><img src="http://hovertree.com/hvtimg/bjafjd/hs6oi257_l.jpg" alt="戰地" /></a></div>
<div class="swiper-slide">jQuery手機觸屏滑動切換幻燈片</div>
<div class="swiper-slide">Slide 4
<br /><a href="demos/21-autoplay.html">自動播放</a>
</div>
<div class="swiper-slide">Slide 5
<a href="http://hovertree.com/h/bjaf/f34s9wqj.htm">原文 </a> <br /><br />
<a href="http://hovertree.com/menu/texiao/">網頁特效 </a> <br /><br />
<a href="http://hovertree.com">何問起 </a> <br />
</div>
<div class="swiper-slide">Slide 6</div>
<div class="swiper-slide">何問起</div>
<div class="swiper-slide">Slide 8</div>
<div class="swiper-slide"><a href="http://hovertree.com/hvtimg/"><img src="http://hovertree.com/hvtimg/bjafjd/070joeh7_l.jpg" alt="航海" /></a></div>
<div class="swiper-slide">Slide 10</div>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination"></div>
<!-- Add Navigation -->
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>

<!-- jQuery -->
<script src="http://down.hovertree.com/jquery/jquery-2.2.4.min.js"></script>
<!-- Swiper JS -->
<script src="http://hovertree.com/texiao/jquery/78/dist/js/swiper.jquery.min.js"></script>

<!-- Initialize Swiper -->
<script>
var swiper = new Swiper('.swiper-container', {
pagination: '.swiper-pagination',
paginationClickable: true,
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev'
});
</script>

<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
<p>適用浏覽器:360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗. 不支持IE8及以下浏覽器。</p>
<p>來源:<a href="http://hovertree.com/" target="_blank">何問起</a></p>
</div>
</body>
</html>
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved