Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
MOUNTAIN
BEACH
FOREST
DESERT
css
@import url("https://fonts.googleapis.com/css?family=Heebo:800"); * { margin: 0; padding: 0; box-sizing: border-box; } body{background-color: #1F1F1F;overflow: hidden} .parent { width: 681px; height: 384px; top: 0; bottom: 0; left: 0; right: 0; margin: auto auto; overflow: hidden; position: absolute; border-radius: 16px; -webkit-box-shadow: 0 0 88px 5px rgba(0, 0, 0, 0.75); -moz-box-shadow: 0 0 88px 5px rgba(0, 0, 0, 0.75); box-shadow: 0 0 88px 5px rgba(0, 0, 0, 0.75); } svg { position: absolute; z-index: 1; width: 681px; height: 384px; } button { position: absolute; z-index: 50; width: 40px; overflow: hidden; height: 40px; border: none; border-radius: 50%; background: #fff; cursor: pointer; -webkit-box-shadow: 0 0 88px 5px rgba(0, 0, 0, 0.75); -moz-box-shadow: 0 0 88px 5px rgba(0, 0, 0, 0.75); box-shadow: 0 0 88px 5px rgba(0, 0, 0, 0.75); } button:focus { outline-width: 0; } circle { stroke: #fff; fill: none; transition: 0.3s; } #svg1 circle { transition-timing-function: linear; } #svg2 circle { transition-timing-function: linear; } #Capa_1 { position: absolute; width: 16px; height: 16px; transform: translate(-7px, -8px); } #Capa_2 { position: absolute; width: 16px; height: 16px; transform: translate(-9px, -8px); } .right { margin-left: 628px; margin-top: 168px; border: 1px solid #849494; background-color: transparent; transition: 0.5s; } .right:hover { background-color: #fff; } .left { margin-left: 0.5%; margin-top: 168px; border: 1px solid #849494; background-color: transparent; transition: 0.5s; } .left:hover { background-color: #fff; } .circle1 { transition-delay: 0.05s; } .circle2 { transition-delay: 0.1s; } .circle3 { transition-delay: 0.15s; } .circle4 { transition-delay: 0.2s; } .circle5 { transition-delay: 0.25s; } .circle6 { transition-delay: 0.3s; } .circle7 { transition-delay: 0.35s; } .circle8 { transition-delay: 0.4s; } .circle9 { transition-delay: 0.45s; } .circle10 { transition-delay: 0.05s; } .circle11 { transition-delay: 0.1s; } .circle12 { transition-delay: 0.15s; } .circle13 { transition-delay: 0.2s; } .circle14 { transition-delay: 0.25s; } .circle15 { transition-delay: 0.3s; } .circle16 { transition-delay: 0.35s; } .circle17 { transition-delay: 0.4s; } .circle18 { transition-delay: 0.45s; } .slide1 { background-image: url("https://images.unsplash.com/photo-1483068612337-c045daaca40e?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1600&h=900&fit=crop&s=6de8746a693acc34ebe9e9a15c4c18d1"); } .slide2 { background-image: url("https://images.unsplash.com/photo-1489914099268-1dad649f76bf?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1600&h=900&fit=crop&s=f21f40bb93bae58300e83f7f72ebb5a5"); } .slide3 { background-image: url("https://images.unsplash.com/photo-1490100667990-4fced8021649?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1600&h=900&fit=crop&s=247f52de1a292b8a1877b0c7dd77a291"); } .slide4 { background-image: url("https://images.unsplash.com/photo-1494783404829-a93883e74b68?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1600&h=900&fit=crop&s=413f5f5c41f4db69a1474d92419601ac"); } .slider { position: absolute; width: 400%; height: 100%; background: #000; display: inline-flex; overflow: hidden; } .slide1, .slide2, .slide3, .slide4 { position: absolute; background-position: center; background-size: cover; color: #fff; font-size: 62px; padding-top: 138px; font-weight: 800; font-family: "Heebo", sans-serif; text-align: center; width: 25%; height: 100%; z-index: 10; transition: 1.4s; } .tran { transform: scale(1.3); } .up1 { z-index: 20; } .up2 { z-index: 40; } .steap { stroke-width: 0; } .streak { stroke-width: 82px; } @media (max-width: 700px) { .parent { margin-left: 1%; } }
JavaScript
var curpage = 1; var sliding = false; var click = true; var left = document.getElementById("left"); var right = document.getElementById("right"); var pagePrefix = "slide"; var pageShift = 500; var transitionPrefix = "circle"; var svg = true; function leftSlide() { if (click) { if (curpage == 1) curpage = 5; console.log("woek"); sliding = true; curpage--; svg = true; click = false; for (k = 1; k <= 4; k++) { var a1 = document.getElementById(pagePrefix + k); a1.className += " tran"; } setTimeout(() => { move(); }, 200); setTimeout(() => { for (k = 1; k <= 4; k++) { var a1 = document.getElementById(pagePrefix + k); a1.classList.remove("tran"); } }, 1400); } } function rightSlide() { if (click) { if (curpage == 4) curpage = 0; console.log("woek"); sliding = true; curpage++; svg = false; click = false; for (k = 1; k <= 4; k++) { var a1 = document.getElementById(pagePrefix + k); a1.className += " tran"; } setTimeout(() => { move(); }, 200); setTimeout(() => { for (k = 1; k <= 4; k++) { var a1 = document.getElementById(pagePrefix + k); a1.classList.remove("tran"); } }, 1400); } } function move() { if (sliding) { sliding = false; if (svg) { for (j = 1; j <= 9; j++) { var c = document.getElementById(transitionPrefix + j); c.classList.remove("steap"); c.setAttribute("class", transitionPrefix + j + " streak"); console.log("streak"); } } else { for (j = 10; j <= 18; j++) { var c = document.getElementById(transitionPrefix + j); c.classList.remove("steap"); c.setAttribute("class", transitionPrefix + j + " streak"); console.log("streak"); } } setTimeout(() => { for (i = 1; i <= 4; i++) { if (i == curpage) { var a = document.getElementById(pagePrefix + i); a.className += " up1"; } else { var b = document.getElementById(pagePrefix + i); b.classList.remove("up1"); } } sliding = true; }, 600); setTimeout(() => { click = true; }, 1700); setTimeout(() => { if (svg) { for (j = 1; j <= 9; j++) { var c = document.getElementById(transitionPrefix + j); c.classList.remove("streak"); c.setAttribute("class", transitionPrefix + j + " steap"); } } else { for (j = 10; j <= 18; j++) { var c = document.getElementById(transitionPrefix + j); c.classList.remove("streak"); c.setAttribute("class", transitionPrefix + j + " steap"); } sliding = true; } }, 850); setTimeout(() => { click = true; }, 1700); } } left.onmousedown = () => { leftSlide(); }; right.onmousedown = () => { rightSlide(); }; document.onkeydown = e => { if (e.keyCode == 37) { leftSlide(); } else if (e.keyCode == 39) { rightSlide(); } }; //for codepen header // setTimeout(() => { // rightSlide(); // }, 500);
粒子
时间
文字
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号