gsap实现炫酷三维碟片可交互式音乐播放器代码
代码语言:html
所属分类:多媒体
代码描述:gsap实现炫酷三维碟片可交互式音乐播放器代码,多个歌曲可滚动切换。
代码标签: gsap 炫酷 三维 碟片 可 交互式 音乐 播放器 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @font-face { font-family: "Avant Garde"; src: url("//repo.bfw.wiki/bfwrepo/fonts/avant-garde.woff2") format("woff2"); } body { display: flex; justify-content: center; align-items: center; height: 100vh; width: 100vw; padding: 0; margin: 0; box-sizing: border-box; overflow: hidden; background: #fff; --mouseX: 0; --mouseY: 0; --x: 0; --progress: 0; font-family: "Avant Garde", Helvetica, sans-serif; cursor: none; } body:after { content: ""; position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: -100; background: var(--label) 50% 50%/cover; filter: blur(10px); opacity: 0; transition: 0.3s ease-in-out; } body > span { position: absolute; bottom: 10px; font-size: 12px; transition: 0.3s ease-in-out; display: inline-block; overflow: hidden; padding: 0 20px; } body > span span { display: inline-block; position: relative; transition: 0.3s ease-in-out; } body > span span:before { content: "pause"; position: absolute; left: 0; top: 50%; transform: translateY(-150%); } body > strong { position: absolute; left: 0.5rem; top: 50%; -ms-writing-mode: tb-lr; writing-mode: vertical-lr; font-size: 25px; } body > strong:last-of-type { left: auto; right: 0.5rem; } body > strong span { display: inline-block; padding: 2px 0; color: transparent; -webkit-text-fill-color: transparent; -webkit-background-clip: text; background-image: linear-gradient(to bottom, transparent 25%, #000 33%, #000 66%, transparent 75%); background-size: 100% 300%; background-position: 50% 100%; -webkit-animation: shift 2s ease-in-out infinite; animation: shift 2s ease-in-out infinite; } @-webkit-keyframes shift { to { background-position: 50% 0%; } } @keyframes shift { to { background-position: 50% 0%; } } body > strong span:nth-of-type(1) { -webkit-animation-delay: 0.25s; animation-delay: 0.25s; } body > strong span:nth-of-type(2) { -webkit-animation-delay: 0.5s; animation-delay: 0.5s; } body > strong span:nth-of-type(3) { -webkit-animation-delay: 0.75s; animation-delay: 0.75s; } body:before { transform-style: preserve-3d; content: ""; position: absolute; width: 100vw; height: 100vh; pointer-events: none; z-index: 99; -webkit-backdrop-filter: blur(30px) saturate(0); backdrop-filter: blur(30px) saturate(0); -webkit-mask: linear-gradient(to right, #000, transparent 25%, transparent 75%, #000); mask: linear-gradient(to right, #000, transparent 25%, transparent 75%, #000); } body:hover #cursor { opacity: 1; } body #cursor { width: 30px; height: 30px; transform: scale(0.75); border-radius: 100%; box-shadow: 0 0 0 5px #000; position: absolute; background: #fff; z-index: 999; pointer-events: none; opacity: 0; transition: opacity 0.5s ease-in-out; mix-blend-mode: soft-light; } body #cursor:before, body #cursor:after { content: ""; position: absolute; width: 50%; height: 50%; top: 25%; left: 25%; transition: 0.3s ease-in-out; transform: scaleY(1); background: #000; -webkit-clip-path: polygon(20% 0, 100% 50%, 100% 50%, 20% 100%); clip-path: polygon(20% 0, 100% 50%, 100% 50%, 20% 100%); } body #marquee { position: absolute; width: 100vw; z-index: 100; overflow: hidden; top: 50%; transform: translateY(-50%) skewY(20deg); left: 0; pointer-events: none; display: flex; padding: 5vw 0; z-index: -100; } body #marquee .content { display: flex; width: 100%; justify-content: space-around; -webkit-animation: scroll 18s linear infinite; animation: scroll 18s linear infinite; } body #marquee .content h1 { color: #efefef; font-size: 5vw; letter-spacing: 5.35vw; width: 100vw; line-height: 1; font-weight: 900; margin: 0; } body #marquee .content h1 span { display: inline-block; -webkit-animation: bob 1.5s ease-in-out infinite alternate; animation: bob 1.5s ease-in-out infinite alternate; } body #marquee .content h1 span:nth-of-type(1) { -webkit-animation-delay: -0.4444444444s; animation-delay: -0.4444444444s; } body #marquee .content h1 span:nth-of-type(2) { -webkit-animation-delay: -0.8888888889s; animation-delay: -0.8888888889s; } body #marquee .content h1 span:nth-of-type(3) { -webkit-animation-delay: -1.3333333333s; animation-delay: -1.3333333333s; } body #marquee .content h1 span:nth-of-type(4) { -webkit-animation-delay: -1.7777777778s; animation-delay: -1.7777777778s; } body #marquee .content h1 span:nth-of-type(5) { -webkit-animation-delay: -2.2222222222s; animation-delay: -2.2222222222s; } body #marquee .content h1 span:nth-of-type(6) { -webkit-animation-delay: -2.6666666667s; animation-delay: -2.6666666667s; } body #marquee .content h1 span:nth-of-type(7) { -webkit-animation-delay: -3.1111111111s; animation-delay: -3.1111111111s; } body #marquee .content h1 span:nth-of-type(8) { -webkit-animation-delay: -3.5555555556s; animation-delay: -3.5555555556s; } body #marquee .content h1 span:nth-of-type(9) { -webkit-animation-delay: -4s; animation-delay: -4s; } body #marquee .content h1 span:nth-of-type(10) { -webkit-animation-delay: -4.4444444444s; animation-delay: -4.4444444444s; } body #marquee .content h1 span:nth-of-type(11) { -webkit-animation-delay: -4.8888888889s; animation-delay: -4.8888888889s; } body #marquee .content h1 span:nth-of-type(12) { -webkit-animation-delay: -5.3333333333s; animation-delay: -5.3333333333s; } body #marquee .content h1 span:nth-of-type(13) { -webkit-animation-delay: -5.7777777778s; animation-delay: -5.7777777778s; } body #marquee .content h1 span:nth-of-type(14) { -webkit-animation-delay: -6.2222222222s; animation-delay: -6.2222222222s; } body #marquee .content h1 span:nth-of-type(15) { -webkit-animation-delay: -6.6666666667s; animation-delay: -6.6666666667s; } body #marquee .content h1 span:nth-of-type(16) { -webkit-animation-delay: -7.1111111111s; animation-delay: -7.1111111111s; } body #marquee .content h1 span:nth-of-type(17) { -webkit-animation-delay: -7.5555555556s; animation-delay: -7.5555555556s; } body #marquee .content h1 span:nth.........完整代码请登录后点击上方下载按钮下载查看
网友评论0