Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
Tint
0%
css
body { background-color: #222; overflow: hidden; /* text-align:center; */ display: flex; align-items: center; justify-content: center; } body, html { height: 100%; width: 100%; margin: 0; padding: 0; } svg { width: 800px; height: 600px; visibility: hidden; } .sliderLabel{ text-anchor:start; fill:#FFFCF9; font-family: 'Questrial', serif; font-size:27px; letter-spacing:0.3px; user-select:none; -moz-user-select:none; } .valueProp{ text-anchor:start; fill:#FFFCF9; font-size:44px; } .dragger{ -webkit-tap-highlight-color:transparent; }
JavaScript
var xmlns = "http://www.w3.org/2000/svg", xlinkns = "http://www.w3.org/1999/xlink", select = function(s) { return document.querySelector(s); }, selectAll = function(s) { return document.querySelectorAll(s); }, onPressTl = new TimelineMax({paused:true}), onReleaseTl = new TimelineMax({paused:true}), tintTl = new TimelineMax({paused:true}), menuPos = {y:0}, sliderPos = 0, maxDragPosX = 470, dragger = select('.dragger'), draggerShadow = select('.draggerShadow'), track = select('.track'), iconFill = select('.iconFill'), panelMask = select('.panelMask'), gradPanel = select('.gradPanel'), iconRing = select('.iconRing'), iconGroup = select('.iconGroup'), bgPanel = select('.bgPanel'), valueProp = select('.valueProp'), draggerPos = TweenMax.set('.dragger', {x:'+=0'}).target[0]._gsTransform TweenMax.set('svg', { visibility: 'visible' }) onPressTl.to([dragger, draggerShadow, '.track'], 0.6,{ attr:{ height:138 }, y:-103, ease:Elastic.easeOut.config(0.3,0.9) }) .staggerTo(['.sliderProp', '.valueProp'], 0.6,{ cycle:{ y:[-71, -84] }, ease:Elastic.easeOut.config(0.3,0.9) },0.05,0) .to('.iconGroup', 0.4, { y:18, //scale:1.2, transformOrigin:'50% 50%', ease:Elastic.easeOut.config(0.3,0.9) },0) .to('.icon', 1, { scale:1.42, transformOrigin:'50% 50%', ease:Elastic.easeOut.config(0.8,0.29) },0) .to(iconRing, 0.02, { alpha:0 },0) .to(gradPanel, 0.6, { attr:{ y:0 }, ease:Elastic.easeOut.config(0.3,0.9) },0) onReleaseTl.to([dragger, draggerShadow, '.track'],0.3,{ attr:{ height:35 }, y:0 }) .to(['.sliderProp', '.valueProp'], 0.6,{ y:-0, ease:Elastic.easeOut.config(0.3,0.9) },'-=0.3') .to('.iconGroup', 0.4, { y:0, scale:1, ease:Elastic.easeOut.config(0.3,0.9) },0) .to(iconRing, 0.4, { alpha:1 },0) .to(gradPanel, 0.3, { attr:{ y:103 } },0) .to('.icon', 1, { scale:1, transformOrigin:'50% 50%', ease:Elastic.easeOut.config(0.8,0.29) },0) tintTl.to([bgPanel,track,iconFill],1, { fill:'#DF2548', ease:Linear.easeNone }) function onPress(){ onReleaseTl.kill(); onPressTl.play(0) } function onRelease(){ onPressTl.kill(); console.log((track.style.fill)) onReleaseTl.play(0) } function onDragUpdate(){ sliderPos = dragger._gsTransform.x/maxDragPosX; valueProp.textContent = ~~(sliderPos * 100) + '%'; TweenMax.set([draggerShadow,panelMask], { x:dragger._gsTransform.x }) tintTl.progress(sliderPos) } function componentToHex(c) { var hex = c.toString(16); return hex.length == 1 ? "0" + hex : hex; } function rgbToHex(r, g, b) { return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b); } Draggable.create(dragger, { type:'x', bounds:{minX:0, maxX:maxDragPosX}, onPress:onPress, onRelease:onRelease, onDrag:onDragUpdate, throwProps:true, onThrowUpdate:onDragUpdate, overshootTolerance:0 }) var tl = new TimelineMax(); //ScrubGSAPTimeline(tl);
粒子
时间
文字
hover
canvas
3d
游戏
音乐
火焰
水波
轮播图
鼠标跟随
动画
css
加载动画
导航
菜单
按钮
滑块
tab
弹出层
统计图
svg
×
Close
在线代码下载提示
开通在线代码永久免费下载,需支付20jQ币
开通后,在线代码模块中所有代码可终身免费下!
您已开通在线代码永久免费下载,关闭提示框后,点下载代码可直接下载!
您已经开通过在线代码永久免费下载
对不起,您的jQ币不足!可通过发布资源 或
直接充值获取jQ币
取消
开通下载
<!doctype html> <html> <head> <meta charset="utf-8"> <title>智能滑块-jq22.com</title> <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script> <style>
</style> </head> <body>
<script>
</script>
</body> </html>
2012-2021 jQuery插件库版权所有
jquery插件
|
jq22工具库
|
网页技术
|
广告合作
|
在线反馈
|
版权声明
沪ICP备13043785号-1
浙公网安备 33041102000314号