欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jQuery iScroll.js 移動(dòng)端滾動(dòng)條美化插件

 更新時(shí)間:2016年02月25日 15:53:43   作者:starof  
這篇文章主要介紹了jQuery iScroll.js 移動(dòng)端滾動(dòng)條美化插件的相關(guān)資料,需要的朋友可以參考下
= pos; pos = pos - that.wrapperH; page++; } if (that.maxScrollY%that.wrapperH) that.pagesY[that.pagesY.length] = that.maxScrollY - that.pagesY[that.pagesY.length-1] + that.pagesY[that.pagesY.length-1]; } // Prepare the scrollbars that._scrollbar('h'); that._scrollbar('v'); if (!that.zoomed) { that.scroller.style[transitionDuration] = '0'; that._resetPos(400); } }, scrollTo: function (x, y, time, relative) { var that = this, step = x, i, l; that.stop(); if (!step.length) step = [{ x: x, y: y, time: time, relative: relative }]; for (i=0, l=step.length; i<l; i++) { if (step[i].relative) { step[i].x = that.x - step[i].x; step[i].y = that.y - step[i].y; } that.steps.push({ x: step[i].x, y: step[i].y, time: step[i].time || 0 }); } that._startAni(); }, scrollToElement: function (el, time) { var that = this, pos; el = el.nodeType ? el : that.scroller.querySelector(el); if (!el) return; pos = that._offset(el); pos.left += that.wrapperOffsetLeft; pos.top += that.wrapperOffsetTop; pos.left = pos.left > 0 ? 0 : pos.left < that.maxScrollX ? that.maxScrollX : pos.left; pos.top = pos.top > that.minScrollY ? that.minScrollY : pos.top < that.maxScrollY ? that.maxScrollY : pos.top; time = time === undefined ? m.max(m.abs(pos.left)*2, m.abs(pos.top)*2) : time; that.scrollTo(pos.left, pos.top, time); }, scrollToPage: function (pageX, pageY, time) { var that = this, x, y; time = time === undefined ? 400 : time; if (that.options.onScrollStart) that.options.onScrollStart.call(that); if (that.options.snap) { pageX = pageX == 'next' ? that.currPageX+1 : pageX == 'prev' ? that.currPageX-1 : pageX; pageY = pageY == 'next' ? that.currPageY+1 : pageY == 'prev' ? that.currPageY-1 : pageY; pageX = pageX < 0 ? 0 : pageX > that.pagesX.length-1 ? that.pagesX.length-1 : pageX; pageY = pageY < 0 ? 0 : pageY > that.pagesY.length-1 ? that.pagesY.length-1 : pageY; that.currPageX = pageX; that.currPageY = pageY; x = that.pagesX[pageX]; y = that.pagesY[pageY]; } else { x = -that.wrapperW * pageX; y = -that.wrapperH * pageY; if (x < that.maxScrollX) x = that.maxScrollX; if (y < that.maxScrollY) y = that.maxScrollY; } that.scrollTo(x, y, time); }, disable: function () { this.stop(); this._resetPos(0); this.enabled = false; // If disabled after touchstart we make sure that there are no left over events this._unbind(MOVE_EV, window); this._unbind(END_EV, window); this._unbind(CANCEL_EV, window); }, enable: function () { this.enabled = true; }, stop: function () { if (this.options.useTransition) this._unbind(TRNEND_EV); else cancelFrame(this.aniTime); this.steps = []; this.moved = false; this.animating = false; }, zoom: function (x, y, scale, time) { var that = this, relScale = scale / that.scale; if (!that.options.useTransform) return; that.zoomed = true; time = time === undefined ? 200 : time; x = x - that.wrapperOffsetLeft - that.x; y = y - that.wrapperOffsetTop - that.y; that.x = x - x * relScale + that.x; that.y = y - y * relScale + that.y; that.scale = scale; that.refresh(); that.x = that.x > 0 ? 0 : that.x < that.maxScrollX ? that.maxScrollX : that.x; that.y = that.y > that.minScrollY ? that.minScrollY : that.y < that.maxScrollY ? that.maxScrollY : that.y; that.scroller.style[transitionDuration] = time + 'ms'; that.scroller.style[transform] = 'translate(' + that.x + 'px,' + that.y + 'px) scale(' + scale + ')' + translateZ; that.zoomed = false; }, isReady: function () { return !this.moved && !this.zoomed && !this.animating; } }; function prefixStyle (style) { if ( vendor === '' ) return style; style = style.charAt(0).toUpperCase() + style.substr(1); return vendor + style; } dummyStyle = null; // for the sake of it if (typeof exports !== 'undefined') exports.iScroll = iScroll; else window.iScroll = iScroll; })(window, document);

html

<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=no, initial-scale=1, minimum-scale=1, maximum-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection"content="telephone=no, email=no" />
<meta name="misapplication-tap-highlight" content="no"/>
<meta name="HandheldFriendly" content="true"/>
<meta name="screen-orientation" content="portrait">
<meta name="x5-orientation" content="portrait">
<meta name="msapplication-tap-highlight" content="no" />
<title></title>
<link rel="stylesheet" type="text/css" href="css/tc.css">
<link rel="stylesheet" type="text/css" href="css/scrollbar.css">
<style>
</style>
</head>
<body>
<!--分配獲獎(jiǎng)號(hào)碼-->
<div class="tcbox" >
<div class="tcmain">
<div class="tc_close"></div>
<div class="tc-content01">
<div class="top-wrap">
<p>您成功參與了<strong>第<span>20151225001</span>期</strong>奪寶,參與<span class="col-org">10</span>人次。</p>
<p>您成功參與了<strong>第<span>20151225002</span>期</strong>奪寶,參與<span class="col-org">10</span>人次。</p>
</div>
<p class="wish">您獲得了<span class="col-org">20</span>個(gè)幸運(yùn)號(hào)碼,祝您奪寶成功!</p>
<div id="tc-wrapper1">
<dl class="num-list">
<dt>第20151225001期</dt>
<dd><span>10002351</span>,<span>10001384</span>,<span>10006354</span>,<span>10002634</span>,<span>10001524</span>,<span>10002351</span>,<span>10001384</span>,<span>10001524</span>,<span>10002351</span>,<span>10001384</span></dd>
<dt>第20151225002期</dt>
<dd><span>10002351</span>,<span>10001384</span>,<span>10006354</span>,<span>10002634</span>,<span>10001524</span>,<span>10002351</span>,<span>10001384</span>,<span>10001524</span>,<span>10002351</span>,<span>10001384</span></dd>
</dl>
</div>
<div class="bottom-wrap">
<a href="javascript:;" class="tc-button" style="display:none">填寫(xiě)領(lǐng)獎(jiǎng)地址</a>
<a href="javascript:;" class="tc-button">確&nbsp;定</a>
</div>
</div>
</div>
</div>
<!--我的奪寶號(hào)碼-->
<div class="tcbox" style="display:none;">
<div class="tcmain">
<div class="tc_close"></div>
<div class="tc-content02">
<p class="mynum">我的奪寶號(hào)碼</p>
<div id="tc-wrapper2">
<dl class="num-list">
<dd><span>10002351</span>,<span>10001384</span>,<span>10006354</span>,<span>10002634</span>,<span>10001524</span>,<span>10002351</span>,<span>10001384</span>,<span>10001524</span>,<span>10002351</span>,<span>10001384</span>,<span>10001384</span>,<span>10006354</span>,<span>10002634</span>,<span>10001524</span>,<span>10002351</span>,<span>10001384</span>,<span>10001524</span>,<span>10002351</span>,<span>10001384</span>,<span>10001384</span>,<span>10006354</span>,<span>10002634</span>,<span>10001524</span>,<span>10002351</span>,<span>10001384</span>,<span>10001524</span>,<span>10002351</span>,<span>10001384</span>,<span>10001384</span>,<span>10001384</span>,<span>10006354</span>,<span>10002634</span>,<span>10001524</span>,<span>10002351</span>,<span>10001384</span>,<span>10001524</span>,<span>10002351</span>,<span>10001384</span>,<span>10001384</span>,<span>10001384</span>,<span>10006354</span>,<span>10002634</span>,<span>10001524</span>,<span>10002351</span>,<span>10001384</span>,<span>10001524</span>,<span>10002351</span>,<span>10001384</span></dd>
</dl>
</div>
<div class="bottom-wrap">
<a href="javascript:;" class="tc-button">確&nbsp;定</a>
</div>
</div>
</div>
</div>
<!--我想?yún)⑴c人次-->
<div class="tcbox" style="display:none;">
<div class="tcmain">
<div class="tc_close"></div>
<div class="tc-content03">
<p class="buytext">我想?yún)⑴c人次</p>
<div class="w-number-wrap"> 
<div class="w-number">
<input class="w-number-input" value="10">
<a class="w-number-btn w-number-btn-plus " data-pro="plus" href="javascript:void(0);">+</a>
<a class="w-number-btn w-number-btn-minus w-number-btn-disabled" data-pro="minus" href="javascript:void(0);">-</a>
</div>
<span class="m-detail-main-buyHint">
<i class="ico-arrow"></i>
<b>獲獎(jiǎng)概率<span>0.026%</span></b>
<b style="display:none;">加大參與人次,奪寶在望!</b>
</span>
</div>
<div class="bottom-wrap">
<a href="javascript:;" class="tc-button">確&nbsp;定</a>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="js/iScroll.js"></script> 
<script type="text/javascript">
var myScroll1,myScroll2;
function loaded() {
myScroll1 = new iScroll('tc-wrapper1', {
scrollbarClass: 'myScrollbar' ,
hScrollbar:false,
vScroll:true,
hideScrollbar: false //是否隱藏滾動(dòng)條 
});
myScroll2 = new iScroll('tc-wrapper2', {
scrollbarClass: 'myScrollbar' ,
hScrollbar:false,
vScroll:true,
hideScrollbar: false //是否隱藏滾動(dòng)條 
});
}
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
document.addEventListener('DOMContentLoaded', loaded, false);
/*顯示彈層層調(diào)用show方法時(shí)重新調(diào)用new iScroll()*/
</script>
</body>
</html> 

2、css

tc.css

@charset "utf-8";
body,div,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,code,form,fieldset,legend,button,textarea,table,tbody,tfoot,thead,th,td,article,aside,dialog,figure,footer,header,hgroup,menu,nav,section,time,mark,audio,video{margin:0;padding:0;outline:0;background:transparent;}article,aside,dialog,figure,footer,header,hgroup,nav,section{display:block;}body,button,input,select,textarea{font:12px/1.5 arial,\5b8b\4f53,sans-serif;}h1,h2,h3,h4,h5,h6,button,input,select,textarea{font-size:100%;outline:none;font-family:inherit}address,cite,dfn,em,var{font-style:normal;}code,kbd,pre,samp{font-family:courier new,courier,monospace;}small{font-size:12px;}ul,ol,li{list-style:none;}img{border:none;}a{text-decoration:none;outline:thin none;}a:hover{text-decoration:underline;}table{border-collapse:collapse;border-spacing:0;}.clear{clear:both;}.clearfix:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0;}html{-webkit-text-size-adjust: none;}
body{font:12px/1.5 \5FAE\8F6F\96C5\9ED1,tahoma,arial,\5b8b\4f53,sans-serif;}
/*彈框*/
.tcbox{width:100%; height:100%; position:fixed; top:0; left:0; background:rgba(0,0,0,0.5); z-index:999;
display:-webkit-box; 
-webkit-box-orient:horizontal; 
-webkit-box-pack:center; 
-webkit-box-align:center; 
display:-moz-box; 
-moz-box-orient:horizontal; 
-moz-box-pack:center; 
-moz-box-align:center; 
display:-o-box; 
-o-box-orient:horizontal; 
-o-box-pack:center; 
-o-box-align:center; 
display:-ms-box; 
-ms-box-orient:horizontal; 
-ms-box-pack:center; 
-ms-box-align:center; 
display:box; 
box-orient:horizontal; 
box-pack:center; 
box-align:center;}
.col-org{color:#ff6200;}
.tcmain{width:78%; max-width:580px; margin:0 auto; background:#fff;border-radius:5px; position:relative; box-sizing:border-box;text-align:center;}
.tc_close{width:19px;height:19px;background: url(../images/tc_close.png) no-repeat;background-size:200%;overflow:hidden;position:absolute;right:8px;top:8px;cursor:pointer;}
.tc_close:hover{background-position:100% 0;}
.tcmain h1{font-size:1.4rem;}
.tcmain a{display:block;}
/*滾動(dòng)條*/
#tc-wrapper1{ height: 146px; position: relative;width:84%;margin:0 auto; }
#tc-wrapper2{ height: 146px; position: relative;width:84%;margin:0 auto; }
/*公用按鈕樣式*/
.tcmain .bottom-wrap{margin-top:10px;background-color:#f2f2f2;border-radius:0 0 5px 5px;padding:10px 0;}
.tcmain .tc-button{display:inline-block;margin:0 auto;min-width:100px;font-size:17px;padding:8px 15px;background-color:#da2b20;color:#fff;border-radius:5px;}
.tcmain .tc-button:hover{text-decoration:none;}
/*分配奪寶號(hào)碼*/
.tc-content01 .top-wrap{font-size:0.75rem;color:#4d4d4d;text-align:left;padding:32px 8% 0;border-bottom:1px dotted #999;}
.tc-content01 .top-wrap p{padding-bottom:0.5rem;}
.tc-content01 .p-title{font-size:14px;padding-left:42px;}
.tc-content01 .p-title.strong{padding-top:13px;}
.tc-content01 .p-title span{color:#ff6200;}
.tc-content01 .wish{font-size:0.75rem;color:#4d4d4d;padding:0.8rem 8% 1rem;text-align:left;}
.tc-content01 .num-list{text-align:left;}
.tc-content01 .num-list dt{font-size:0.625rem;color:#1a1a1a;padding-bottom:4px;}
.tc-content01 .num-list dd{font-size:0.625rem;color:#808080;padding-bottom:20px;word-wrap:break-word;}
.tc-content01 .num-list dd span{display:inline-block;white-space:nowrap;}
/*全部號(hào)碼*/
.tc-content02 .mynum{padding:25px 0 12px;font-size:0.75rem;color:#404040;}
.tc-content02 .num-list{text-align:left;}
.tc-content02 .num-list dd{font-size:0.625rem;line-height:1.5rem;color:#333;padding-bottom:20px;word-wrap:break-word;}
.tc-content02 .num-list dd span{display:inline-block;white-space:nowrap;}
/*參與人次*/
.tc-content03 .buytext{padding:30px 0 12px;font-size:0.8125rem;color:#404040;}
.tc-content03 .w-number-wrap{position:relative;padding-bottom:25px;}
.tc-content03 .w-number {
position: relative;
margin:0 auto;
height:45px;
width:88px;
vertical-align: middle;
padding:0 35px;
}
.tc-content03 .w-number-input {
float: left;
font-size:20px;
text-align: center;
width: 78px;
border: 1px solid #dadada;
background-color:#fafafa;
height: 44px;
line-height:44px;
padding: 0 4px;
outline: medium none;
}
.tc-content03 .w-number-btn {
color:#666;
border: 1px solid #E0E0E0;
position: absolute;
font-size:20px;
text-align: center;
text-decoration: none;
width: 34px;
height: 44px; 
line-height: 44px;
overflow: hidden;
font-weight:700;
}
.tc-content03 .w-number-btn:hover{color:#da2b20;text-decoration:none;}
.tc-content03 .w-number-btn-plus {
right: 0px;
top: 0px;
}
.tc-content03 .w-number-btn-minus {
right: auto;
left: 0px;
top: 0px;
}
/*中獎(jiǎng)概率*/
.tc-content03 .m-detail-main-buyHint {
position: absolute;
left:100px;
top:50px;
font-size:0.625rem;
padding: 0px 8px 0px 8px;
display: inline-block;
background-color: #ffe3e3;
border: 1px solid #e0e0e0;
color: #fe7386;
line-height:1rem;
border-radius: 4px;
}
.tc-content03 .m-detail-main-buyHint b {
font-weight: normal;
}
.tc-content03 .m-detail-main-buyHint .ico-arrow {
position: absolute;
left: 40px;
top:-4px;
width:6px;
height:4px;
background: url(../images/tip-top.png) no-repeat center;
background-size:100%;
overflow: hidden;
} 

scrollbar.css

@charset "utf-8";
/* CSS Document */
/**
*
* Horizontal Scrollbar
*
*/
.myScrollbarH {
position:absolute;
z-index:100;
height:8px;
bottom:1px;
left:2px;
right:7px
}
.myScrollbarH > div {
position:absolute;
z-index:100;
height:100%;
/* The following is probably what you want to customize */
background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#a00), to(#f00));
background-image:-moz-linear-gradient(top, #f00, #900);
background-image:-o-linear-gradient(top, #f00, #900);
border:1px solid #900;
-webkit-background-clip:padding-box;
-moz-background-clip:padding-box;
-o-background-clip:padding-box;
background-clip:padding-box;
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
-o-box-sizing:border-box;
box-sizing:border-box;
-webkit-border-radius:4px;
-moz-border-radius:4px;
-o-border-radius:4px;
border-radius:4px;
-webkit-box-shadow:inset 1px 1px 0 rgba(255,255,255,0.5);
-moz-box-shadow:inset 1px 1px 0 rgba(255,255,255,0.5);
-o-box-shadow:inset 1px 1px 0 rgba(255,255,255,0.5);
box-shadow:inset 1px 1px 0 rgba(255,255,255,0.5);
}
/**
*
* Vertical Scrollbar
*
*/
.myScrollbarV {
position:absolute;
z-index:100;
width:4px;bottom:7px;top:2px;right:1px;
background-color:#d6d6d6;
border-radius:4px;
}
.myScrollbarV > div {
position:absolute;
z-index:100;
width:100%;
/* The following is probably what you want to customize */
background:-webkit-gradient(linear, 0 0, 100% 0, from(#f00), to(#ff6200));
background-image:-moz-linear-gradient(top, #f00, #ff6200);
background-image:-o-linear-gradient(top, #f00, #ff6200);
border:1px solid #ff6200;
-webkit-background-clip:padding-box;
-moz-background-clip:padding-box;
-o-background-clip:padding-box;
background-clip:padding-box;
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
-o-box-sizing:border-box;
box-sizing:border-box;
-webkit-border-radius:4px;
-moz-border-radius:4px;
-o-border-radius:4px;
border-radius:4px;
-webkit-box-shadow:inset 1px 1px 0 rgba(255,255,255,0.5);
-moz-box-shadow:inset 1px 1px 0 rgba(255,255,255,0.5);
-o-box-shadow:inset 1px 1px 0 rgba(255,255,255,0.5);
box-shadow:inset 1px 1px 0 rgba(255,255,255,0.5);
}

3、效果

相關(guān)文章

  • jQuery實(shí)現(xiàn)的tab標(biāo)簽切換效果示例

    jQuery實(shí)現(xiàn)的tab標(biāo)簽切換效果示例

    這篇文章主要介紹了jQuery實(shí)現(xiàn)的tab標(biāo)簽切換效果,結(jié)合實(shí)例形式分析了jQuery響應(yīng)鼠標(biāo)事件動(dòng)態(tài)變換頁(yè)面元素屬性的相關(guān)操作技巧,需要的朋友可以參考下
    2016-09-09
  • 12款經(jīng)典的白富美型—jquery圖片輪播插件—前端開(kāi)發(fā)必備

    12款經(jīng)典的白富美型—jquery圖片輪播插件—前端開(kāi)發(fā)必備

    圖片輪播是網(wǎng)站中的常用功能,用于在有限的網(wǎng)頁(yè)空間內(nèi)展示一組產(chǎn)品圖片或者照片,同時(shí)還有非常吸引人的動(dòng)畫(huà)效果,本文向大家推薦12款實(shí)用的 jQuery 圖片輪播效果插件感興趣的朋友可以了解下哦
    2013-01-01
  • jQuery插件實(shí)現(xiàn)多級(jí)聯(lián)動(dòng)菜單效果

    jQuery插件實(shí)現(xiàn)多級(jí)聯(lián)動(dòng)菜單效果

    開(kāi)發(fā)一個(gè)jQuery插件實(shí)現(xiàn)多級(jí)聯(lián)動(dòng)菜單效果,實(shí)現(xiàn)步驟很詳細(xì),感興趣的小伙伴們可以參考一下
    2015-12-12
  • Jquery Ajax的Get方式時(shí)需要注意URL地方

    Jquery Ajax的Get方式時(shí)需要注意URL地方

    我們要時(shí)刻注意瀏覽器緩存, 當(dāng)使用GET方式時(shí)要添加時(shí)間戳參數(shù) (net Date()).getTime() 來(lái)保證每次發(fā)送的URL不同, 可以避免瀏覽器緩存.
    2011-04-04
  • jQuery驗(yàn)證表單格式的使用方法

    jQuery驗(yàn)證表單格式的使用方法

    本文給大家講解關(guān)于此jQuery驗(yàn)證的一些標(biāo)記以及使用方法,非常不錯(cuò),具有參考借鑒借鑒價(jià)值,需要的朋友參考下
    2017-01-01
  • jquery.mousewheel實(shí)現(xiàn)整屏翻屏效果

    jquery.mousewheel實(shí)現(xiàn)整屏翻屏效果

    jQuery Mousewheel 用于添加跨瀏覽器的鼠標(biāo)滾輪支持。 mousewheel事件的處理函數(shù)有一點(diǎn)小小的變化,它除了第一個(gè)參數(shù)event 外,還接收到第二個(gè)參數(shù)delta。通過(guò)參數(shù)delta可以獲取鼠標(biāo)滾輪的方向和速度。
    2015-08-08
  • jQuery 學(xué)習(xí) 幾種常用方法

    jQuery 學(xué)習(xí) 幾種常用方法

    jQuery中為我們提供了很多有用的方法和屬性,自己總結(jié)的一些常用的函數(shù),方法。個(gè)人認(rèn)為在開(kāi)發(fā)中會(huì)比較常用的,僅供大家學(xué)習(xí)和參考。
    2009-06-06
  • jQuery md5加密插件jQuery.md5.js用法示例

    jQuery md5加密插件jQuery.md5.js用法示例

    這篇文章主要介紹了jQuery md5加密插件jQuery.md5.js用法,結(jié)合實(shí)例形式簡(jiǎn)單分析了jQuery md5加密插件jquery.md5.js的簡(jiǎn)單使用技巧,需要的朋友可以參考下
    2018-08-08
  • 基于JQuery及AJAX實(shí)現(xiàn)名人名言隨機(jī)生成器

    基于JQuery及AJAX實(shí)現(xiàn)名人名言隨機(jī)生成器

    這篇文章主要為大家詳細(xì)介紹了基于JQuery及AJAX實(shí)現(xiàn)名人名言隨機(jī)生成器,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-02-02
  • jquery 常用操作方法

    jquery 常用操作方法

    jquery 常用操作方法這樣的文件腳本之家發(fā)布的也比較多了,但每個(gè)人整理的不相同,大家可以參考腳本之家之前的發(fā)布的文章結(jié)合一下比較好。
    2010-01-01

最新評(píng)論