css实现滑动式光效tab选项卡菜单效果代码
代码语言:html
所属分类:菜单导航
代码描述:css实现滑动式光效tab选项卡菜单效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css2?family=Inter+Tight&display=swap" rel="stylesheet"> <style> :root { --dark: #000; --primary: #150050; --secondary: #3f0071; } body { overflow: hidden; box-sizing: border-box; margin: 0; padding: 0; font-family: "Inter Tight"; color: #dadada; } .main-container { height: 100vh; width: 100vw; display: flex; align-items: center; justify-content: center; padding: 0 10px; background: radial-gradient(circle at 5% 45%, #000 20%, #15005000 60%), radial-gradient(circle at 50% 60%, #000 40%, #3f007100 80%), radial-gradient(circle at 25% 40%, #610094 42%, #00000000 60%), radial-gradient(circle at 35% 95%, #00000000 30%, #150050 60%), radial-gradient(circle at 100% 40%, #610094 38%, #00000000 70%), radial-gradient(circle at 10% 70%, #610094 38%, #00000000 70%); } .tab-container { --shine-start: 0%; --shine-mid: 50%; --shine-end: 100%; width: 500px; max-width: calc(100vw - 40px); overflow: hidden; border-radius: 5px; background: linear-gradient(to bottom, #101010, #00000000); backdrop-filter: blur(20px); box-shadow: 0 20px 600px 40px #3f0071aa; } .tab-header { display: flex; position: relative; overflow: hidden; justify-content: center; border-top: 1px solid; border-width: 2px; border-image-source: linear-gradient(to right, #3f007100 var(--shine-start), #3f0071 var(--shine-mid), #3f007100 var(--shine-end)); border-image-slice: 1; border-bottom: 1px solid #3f0071aa; transition: 0.25s; } .tab-header:before { content: ""; position: absolute; width: 100%; height: 40%; background: #ffffff05; } .tab-header .tab-shine { position: absolute; left: 50%; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0