Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
Slide
One
next
Slide
Two
next
Slide
Three
next
NATHAN.TOKYO
css
body { background: #aaa; font-family: "Open Sans", sans-serif; } .slider { position: relative; height: 100vh; width: 100vw; background: #777; overflow: hidden; } .slider__wrap { position: absolute; width: 100vw; height: 100vh; -webkit-transform: translateX(100vw); transform: translateX(100vw); top: 0%; left: 0; right: auto; overflow: hidden; -webkit-transition: -webkit-transform 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: -webkit-transform 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: transform 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: transform 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86), -webkit-transform 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86); -webkit-transform-origin: 0% 50%; transform-origin: 0% 50%; -webkit-transition-delay: 450ms; transition-delay: 450ms; opacity: 0; } .slider__wrap--hacked { opacity: 1; } .slider__back { position: absolute; width: 100%; height: 100%; background-size: auto 100%; background-position: center; background-repeat: none; -webkit-transition: -webkit-filter 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: -webkit-filter 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: filter 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: filter 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86), -webkit-filter 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86); } .slider__inner { width: 100%; height: 100%; position: absolute; top: 0; left: 0%; background-size: auto 133.3333%; background-position: center; background-repeat: none; -webkit-transform: scale(0.75); transform: scale(0.75); -webkit-transition: box-shadow 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86), opacity 450ms step-end, -webkit-transform 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: box-shadow 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86), opacity 450ms step-end, -webkit-transform 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: transform 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86), box-shadow 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86), opacity 450ms step-end; transition: transform 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86), box-shadow 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86), opacity 450ms step-end, -webkit-transform 450ms cubic-bezier(0.785, 0.135, 0.15, 0.86); opacity: 0; box-shadow: 0 3vh 3vh transparent; padding: 15vh; box-sizing: border-box; } .slider__content { position: relative; top: 50%; width: auto; -webkit-transform: translateY(-50%); transform: translateY(-50%); color: white; font-family: "Heebo", sans-serif; opacity: 0; -webkit-transition: opacity 450ms; transition: opacity 450ms; } .slider__content h1 { font-weight: 900; font-size: 9vh; line-height: 0.85; margin-bottom: 0.75vh; pointer-events: none; text-shadow: 0 0.375vh 0.75vh rgba(0, 0, 0, 0.1); } .slider__content a { cursor: pointer; font-size: 2.4vh; letter-spacing: 0.3vh; font-weight: 100; position: relative; } .slider__content a:after { content: ''; display: block; width: 9vh; background: white; height: 1px; position: absolute; top: 50%; left: 6vh; -webkit-transform: translateY(-50%); transform: translateY(-50%); -webkit-transform-origin: 0% 50%; transform-origin: 0% 50%; -webkit-transition: -webkit-transform 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: -webkit-transform 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: transform 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: transform 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86), -webkit-transform 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86); } .slider__content a:before { content: ''; border-top: 1px solid white; border-right: 1px solid white; display: block; width: 1vh; height: 1vh; -webkit-transform: translateX(0) translateY(-50%) rotate(45deg); transform: translateX(0) translateY(-50%) rotate(45deg); position: absolute; font-family: "Heebo", sans-serif; font-weight: 100; top: 50%; left: 15vh; -webkit-transition: -webkit-transform 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: -webkit-transform 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: transform 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: transform 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86), -webkit-transform 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86); } .slider__content a:hover:after { -webkit-transform: scaleX(1.5); transform: scaleX(1.5); -webkit-transition: -webkit-transform 1200ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: -webkit-transform 1200ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: transform 1200ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: transform 1200ms cubic-bezier(0.785, 0.135, 0.15, 0.86), -webkit-transform 1200ms cubic-bezier(0.785, 0.135, 0.15, 0.86); } .slider__content a:hover:before { -webkit-transform: translateX(6vh) translateY(-50%) rotate(45deg); transform: translateX(6vh) translateY(-50%) rotate(45deg); -webkit-transition: -webkit-transform 1200ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: -webkit-transform 1200ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: transform 1200ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: transform 1200ms cubic-bezier(0.785, 0.135, 0.15, 0.86), -webkit-transform 1200ms cubic-bezier(0.785, 0.135, 0.15, 0.86); } .slider__slide { position: absolute; left: 0; height: 100vh; width: 100vw; -webkit-transition: -webkit-transform 600ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: -webkit-transform 600ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: transform 600ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: transform 600ms cubic-bezier(0.785, 0.135, 0.15, 0.86), -webkit-transform 600ms cubic-bezier(0.785, 0.135, 0.15, 0.86); -webkit-transition-delay: 600ms; transition-delay: 600ms; pointer-events: none; z-index: 0; } .slider__slide--active { -webkit-transform: translatex(0%); transform: translatex(0%); z-index: 2; } .slider__slide--active .slider__wrap { -webkit-transform: translateX(0); transform: translateX(0); -webkit-transform-origin: 100% 50%; transform-origin: 100% 50%; opacity: 1; -webkit-animation: none; animation: none; } .slider__slide--active .slider__back { -webkit-filter: blur(1.5vh); filter: blur(1.5vh); -webkit-transition: -webkit-filter 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: -webkit-filter 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: filter 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: filter 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86), -webkit-filter 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86); -webkit-transition-delay: 900ms !important; transition-delay: 900ms !important; } .slider__slide--active .slider__inner { -webkit-transform: scale(0.8); transform: scale(0.8); box-shadow: 0 1vh 6vh rgba(0, 0, 0, 0.2); pointer-events: auto; opacity: 1; -webkit-transition: box-shadow 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86), opacity 1ms step-end, -webkit-transform 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: box-shadow 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86), opacity 1ms step-end, -webkit-transform 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86); transition: transform 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86), box-shadow 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86), opacity 1ms step-end; transition: transform 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86), box-shadow 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86), opacity 1ms step-end, -webkit-transform 900ms cubic-bezier(0.785, 0.135, 0.15, 0.86); -webkit-transition-delay: 900ms; transition-delay: 900ms; } .slider__slide--active .slider__content { opacity: 1; -webkit-transition-delay: 1350ms; transition-delay: 1350ms; } .slider__slide:not(.slider__slide--active) .slider__wrap { -webkit-animation-name: hack; animation-name: hack; -webkit-animation-duration: 900ms; animation-duration: 900ms; -webkit-animation-delay: 450ms; animation-delay: 450ms; -webkit-animation-timing-function: cubic-bezier(0.785, 0.135, 0.15, 0.86); animation-timing-function: cubic-bezier(0.785, 0.135, 0.15, 0.86); } @-webkit-keyframes hack { 0% { -webkit-transform: translateX(0); transform: translateX(0); opacity: 1; } 50% { -webkit-transform: translateX(-100vw); transform: translateX(-100vw); opacity: 1; } 51% { -webkit-transform: translateX(-100vw); transform: translateX(-100vw); opacity: 0; } 52% { -webkit-transform: translateX(100vw); transform: translateX(100vw); opacity: 0; } 100% { -webkit-transform: translateX(100vw); transform: translateX(100vw); opacity: 1; } } @keyframes hack { 0% { -webkit-transform: translateX(0); transform: translateX(0); opacity: 1; } 50% { -webkit-transform: translateX(-100vw); transform: translateX(-100vw); opacity: 1; } 51% { -webkit-transform: translateX(-100vw); transform: translateX(-100vw); opacity: 0; } 52% { -webkit-transform: translateX(100vw); transform: translateX(100vw); opacity: 0; } 100% { -webkit-transform: translateX(100vw); transform: translateX(100vw); opacity: 1; } } .slider__slide:nth-child(1) .slider__back, .slider__slide:nth-child(1) .slider__inner { background-image: url(https://unsplash.it/1600/800/?image=931); } .slider__slide:nth-child(2) .slider__back, .slider__slide:nth-child(2) .slider__inner { background-image: url(https://unsplash.it/1600/800/?image=929); } .slider__slide:nth-child(3) .slider__back, .slider__slide:nth-child(3) .slider__inner { background-image: url(https://unsplash.it/1600/800/?image=927); } .sig { position: fixed; bottom: 8px; right: 8px; text-decoration: none; font-size: 12px; font-weight: 100; font-family: sans-serif; color: rgba(255, 255, 255, 0.4); letter-spacing: 2px; z-index: 9999; }
JavaScript
$(document).ready(function(){ for (var i=1; i <= $('.slider__slide').length; i++){ $('.slider__indicators').append('
') } setTimeout(function(){ $('.slider__wrap').addClass('slider__wrap--hacked'); }, 1000); }) function goToSlide(number){ $('.slider__slide').removeClass('slider__slide--active'); $('.slider__slide[data-slide='+number+']').addClass('slider__slide--active'); } $('.slider__next, .go-to-next').on('click', function(){ var currentSlide = Number($('.slider__slide--active').data('slide')); var totalSlides = $('.slider__slide').length; currentSlide++ if (currentSlide > totalSlides){ currentSlide = 1; } goToSlide(currentSlide); })
粒子
时间
文字
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号