css+js布局实现健身类app ui界面交互效果代码
代码语言:html
所属分类:布局界面
代码描述:css+js布局实现健身类app ui界面交互效果代码
代码标签: css js 布局 健身 类 app ui 界面 交互
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif; } body { background: #2a2a2a; min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 20px; } .phone-frame { width: 375px; height: 800px; background: #111; border-radius: 40px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); padding: 12px; position: relative; overflow: hidden; } .notch { position: absolute; width: 180px; height: 28px; background: #111; top: 0; left: 50%; transform: translateX(-50%); border-bottom-left-radius: 18px; border-bottom-right-radius: 18px; z-index: 100; } .home-indicator { position: absolute; width: 140px; height: 5px; background: rgba(255, 255, 255, 0.5); bottom: 8px; left: 50%; transform: translateX(-50%); border-radius: 3px; z-index: 100; } .phone-screen { width: 100%; height: 100%; border-radius: 30px; overflow: hidden; position: relative; background: linear-gradient(160deg, #0A1128, #001F54); } .container { height: 100%; width: 100%; overflow-y: auto; color: #ffffff; position: relative; padding: 40px 20px 90px; scrollbar-width: none; -ms-overflow-style: none; } .container::-webkit-scrollbar { display: none; } .status-bar { display: flex; justify-content: space-between; align-items: center; padding: 5px 25px; font-size: 14px; position: absolute; top: 5px; left: 0; right: 0; z-index: 10; } .time { font-weight: 600; color: white; } .status-icons { display: flex; gap: 6px; } .status-icons svg { color: white; fill: white; stroke: white; } .battery svg rect { stroke: white; } .battery svg rect:nth-child(2) { fill: white; } .date { font-size: 16px; opacity: 0.9; text-align: center; margin: 20px 0 10px; } .app-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding: 0 5px; } .app-title { font-size: 28px; font-weight: 700; background: linear-gradient(90deg, #4CC9F0, #4361EE); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .user-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(45deg, #4361EE, #4CC9F0); display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 18px; cursor: pointer; } .progress-section { display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 10px 0 25px; } .progress-container { position: relative; width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; } .progress-circle { fill: none; stroke-width: 12; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; } .progress-bg { stroke: rgba(255, 255, 255, 0.1); } .progress-fill { stroke: #4CC9F0; stroke-dasharray: 553; stroke-dashoffset: 553; transition: stroke-dashoffset 1.5s ease-out; } .progress-text { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; } .step-count { font-size: 40px; font-weight: 700; } .step-label { font-size: 16px; opacity: 0.8; } .step-goal { margin-top: 5px; font-size: 14px; opacity: 0.6; } .activity-stats { display: flex; justify-content: space-between; width: 100%; margin-top: 15px; padding: 0 10px; } .activity-stat { text-align: center; } .activity-stat .stat-value { font-size: 20px; font-weight: 600; } .activity-stat .stat-label { font-size: 12px; opacity: 0.7; } .weekly-chart { margin-bottom: 25px; padding: 15px; background: rgba(255, 255, 255, 0.05); border-radius: 16px; backdrop-filter: blur(5px); border: 1px solid rgba(255, 255, 255, 0.08); } .chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; } .chart-title { font-size: 16px; font-weight: 600; } .chart-controls { display: flex; gap: 5px; } .chart-button { padding: 4px 8px; border-radius: 12px; background: rgba(255, 255, 255, 0.1); border: none; color: white; font-size: 12px; cursor: pointer; transition: all 0.2s ease; } .chart-button.active { background: rgba(77, 201, 240, 0.3); } .chart-container { height: 150px; display: flex; align-items: flex-end; justify-content: space-between; padding-top: 10px; } .chart-bar { width: 28px; background: rgba(77, 201, 240, 0.2); border-radius: 6px; position: relative; transition: height 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease; } .chart-bar.active { background: linear-gradient(to top, #4361EE, #4CC9F0); } .mon-bar { height: 65%; } .tue-bar { height: 55%; } .wed-bar { height: 90%; } .thu-bar { height: 75%; } .fri-bar { height: 95%; } .sat-bar { height: 50%; } .sun-bar { height: 74%; } .day-label { position: absolute; bottom: -25px; left: 50%; transform: translateX(-50%); font-size: 12px; opacity: 0.7; } .bar-value { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 11px; opacity: 0; } .chart-bar:active { background-color: rgba(77, 201, 240, 0.4); } .section-title { font-size: 18px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; } .card { background: rgba(255, 255, 255, 0.08); border-radius: 16px; padding: 16px; margin-bottom: 15px; backdrop-filter: blur(5px); border: 1px solid rgba(255, 255, 255, 0.1); transition: transform 0.3s ease, box-shadow.........完整代码请登录后点击上方下载按钮下载查看
网友评论0