tailwind实现可拖拽切换用户评价堆叠卡片幻灯片效果代码
代码语言:html
所属分类:幻灯片
代码描述:tailwind实现可拖拽切换用户评价堆叠卡片幻灯片效果代码
代码标签: tailwind 拖拽 切换 用户 评价 堆叠 卡片 幻灯片
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600&display=swap" rel="stylesheet"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.4.0.css"> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/tailwindcss.3.4.16.js"></script> <script> tailwind.config = { theme: { extend: { colors: { aura: { bg: '#0d0e10', card: '#13141a', border: '#1f2023', accent: '#5e6ad2', purple: '#8b5cf6', text: '#b4bcd0', muted: '#7c8794' } }, fontFamily: { geist: ['Geist', 'sans-serif'], } } } } </script> <style> .glass-effect { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); } .avatar { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #5e6ad2, #8b5cf6); display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 16px; } /* Interactive Card Stack Styles */ .testimonials-stack { --_offset-steps: 4rem; --_scale-steps: 25; --_opacity-steps: 15; --_ani-duration: 300ms; --_offset-steps-two: calc(var(--_offset-steps) * -1); --_offset-steps-three: calc(var(--_offset-steps) * -2); --scale-steps-two: calc(1 - var(--_scale-steps) * 0.01); --scale-steps-three: calc(1 - var(--_scale-steps) * 0.02); --opacity-steps-two: calc(1 - var(--_opacity-steps) * 0.02); --opacity-steps-three: calc(1 - var(--_opacity-steps) * 0.04); display: grid; grid-template-areas: "stack"; width: min(calc(100% - 2rem), 37.5rem); position: relative; margin: 0 auto; } .testimonial-card { position: relative; isolation: isolate; background: linear-gradient(135deg, rgba(19, 20, 26, 0.7) 0%, rgba(31, 32, 35, 0.4) 100%); border: 1px solid rgba(31, 32, 35, 0.8); grid-area: stack; border-radius: 16px; transition: 500ms ease-in-out; translate: 0 var(--_offset); order: var(--_order); z-index: var(--_order); scale: var(--_scale); opacity: var(--_opacity); box-shadow: 0px 0px 0px 1px rgba(94, 1.........完整代码请登录后点击上方下载按钮下载查看
网友评论0