div+css布局实现炫酷音乐播放软件ui代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局实现炫酷音乐播放软件ui代码
代码标签: div css 布局 炫酷 音乐 播放 软件 ui 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vision Pro Style Music Player</title>
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.4.0.css">
<style>
:root {
--glass-bg: rgba(20, 20, 20, 0.6); /* 深色半透明背景 */
--glass-border: rgba(255, 255, 255, 0.15); /* 玻璃边缘高光 */
--glass-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); /* 深度阴影 */
--text-main: #ffffff;
--text-muted: rgba(255, 255, 255, 0.6);
--accent-color: #1ed760; /* 播放按钮绿 */
--blur-amount: 40px; /* 毛玻璃模糊度 */
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}
body {
height: 100vh;
width: 100vw;
/* 背景图:模拟真实环境,体现透视感 */
background: url('//repo.bfw.wiki/bfwrepo/image/6689c1749b65a.png') no-repeat center center;
background-size: cover;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
/* 整个播放器容器 */
.app-container {
display: flex;
width: 1100px;
height: 700px;
gap: 20px;
position: relative;
}
/* 通用玻璃拟态类 */
.glass-panel {
background: var(--glass-bg);
backdrop-filter: blur(var(--blur-amount));
-webkit-backdrop-filter: blur(var(--blur-amount)); /* Safari 支持 */
border: 1px solid var(--glass-border);
border-radius: 30px;
box-shadow: var(--glass-shadow);
color: var(--text-main);
}
/* --- 左侧侧边栏 --- */
.sidebar {
width: 260px;
padding: 30px 20px;
display: flex;
flex-direction: column;
}
.sidebar h2 {
font-size: 22px;
font-weight: 700;
margin-bottom: 30px;
padding-left: 10px;
}
.menu-group {
margin-bottom: 30px;
}
.menu-title {
font-size: 12px;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 1px;
margin-bottom: 10px;
padding-left: 10px;
}
.menu-item {
display: flex;
align-items: center;
padding: 12px 15px;
border-radius: 12px;
cursor: pointer;
transition: background 0.3s;
color: var(--text-muted);
font-weight: 500;
margin-bottom: 5px;
}
.menu-item:hover {
background: rgba(255, 255, 255, 0.1);
color: var(--text-main);
}
.menu-item.active {
background: rgba(255, 255, 255, 0.15);
color: var(--text-main);
}
.menu-item i {
width: 25px;
margin-right: 10px;
}
/* --- 右侧主内容区 --- */
.main-content {
flex: 1;
padding: 0;
position: relative; /* 为了放置浮动的播放条 */
display: flex;
flex-direction: column;
overflow: hidden; /* 防止内容溢出圆角 */
}
.scroll-area {
padding: 30px 40px;
overflow-y: auto;
heigh.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0