From e9bfda1eb57ae47a30d0f75fcb6873b8448bc278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E9=97=A8?= <1745745@qq.com> Date: Fri, 13 Mar 2015 17:52:53 +0800 Subject: [PATCH] 3.1.0 --- Changelog.md | 5 ++ README.md | 7 +- index.html | 175 ++++++++++++++++++++++++++++++++++++++++++- js/swipeSlide.js | 63 +++++++++++----- js/swipeSlide.min.js | 4 +- 5 files changed, 230 insertions(+), 24 deletions(-) diff --git a/Changelog.md b/Changelog.md index da8a854..789a307 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,8 @@ +### 3.1.0(150313) + +* 支持指定索引值、前一屏、后一屏轮播 +* 修复一屏内多图懒加载bug + ### 3.0.0(150227) * 重构js diff --git a/README.md b/README.md index 39f2768..7afa996 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,9 @@ Zepto 或者 jQuery ## 最新版本 -### 3.0.0(150227) +### 3.1.0(150313) -* 重构js -* 支持resize -* 修改回调callback写法 +* 支持指定索引值、前一屏、后一屏轮播 +* 修复一屏内多图懒加载bug [所有更新日志](Changelog.md) \ No newline at end of file diff --git a/index.html b/index.html index 35c0a83..627bcab 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,9 @@ /* 缩放网页,文字大小不变 */ -webkit-text-size-adjust:none; } +body{ + font-size: 14px; +} h1{ font-size: 16px; } @@ -22,7 +25,7 @@ position: relative; max-width: 640px; overflow: hidden; - margin: 10px auto; + margin: 20px auto; } .slide:after{ content: ''; @@ -78,6 +81,81 @@ #slide1{ width: 320px; } + +/* demo4 */ +.slide_tab{ + margin: 20px auto; + border-bottom: 1px solid #ccc; +} +.slide_tab .tab_box{ + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + height: 44px; + line-height: 44px; + background-color: #aaa; + text-align: center; + color: #fff; +} +.slide_tab .btn_left,.slide_tab .btn_right{ + width: 50px; +} +.slide_tab .tab{ + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; +} +.slide_tab .tab span{ + display: block; + -webkit-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; +} +.slide_tab .tab .cur{ + background-color: #fff; + color: #333; +} +.slide_tab .product_box{ + position: relative; + overflow: hidden; + margin: 0; +} +.slide_tab .product_box:after{ + padding-top: 100%; +} +.slide_tab .product_box li:after{ + content:''; + display:table; + clear:both; +} +.slide_tab .product_box .pic{ + position: relative; + float: left; + width: 50%; + box-sizing: border-box; + border-right: 1px solid #ccc; + border-top: 1px solid #ccc; +} +.slide_tab .product_box .pic:after{ + content: ''; + display: block; + width: 100%; + padding-top: 100%; +} +.slide_tab .product_box .pic img{ + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; +}
@@ -175,19 +253,95 @@