.play-button { margin: 20px; padding: 10px 20px; font-size: 13px; cursor: pointer; } .container { display: none; /* 默认隐藏 */ position: fixed; bottom: 0; left: 0; width: 100%; background-color: #fff; border-top: 1px solid #ccc; z-index: 1000; /* 确保容器在最上层 */ justify-content: center; /* 水平居中子元素 */ } /* 播放列表按钮容器 */ .listButton { position: relative; /* 相对定位使播放列表容器定位于该按钮 */ } .payaaa { display: flex; align-items: flex-end; /* 底部对齐 */ } #listButton { background: none; border: none; cursor: pointer; padding: 0; margin-right: 0px; /* 按钮和数字之间的间距 */ } #listButton img { display: block; } #palynum { font-size: 8px; /* 根据需要调整字体大小 */ } .playlist-container { position: absolute; bottom: 35px; /*让选择框出现在播放按钮上方,可以根据需要调整*/ background: linear-gradient( 180deg, #FFFFFF 0%, #F0EFE2 100%); border: 1px solid #ccc; border-top-left-radius: 10px; border-top-right-radius: 10px; height: 350px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */ display:none; left: -120px; z-index: 1000; /*确保在其他元素之上 */ } .playlist-header { padding: 10px; background: linear-gradient( 180deg, #FFFFFF 0%, #F0EFE2 100%); border-top-left-radius: 10px; border-top-right-radius: 10px; font-family: Microsoft YaHei, Microsoft YaHei; font-weight: 700; font-size: 16px; color: #666666; line-height: 21px; text-align: justify; font-style: normal; text-transform: none; position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; /* 播放列表靠左,图标靠右 */ } .right-icons { display: flex; align-items: center; } .right-icons img { cursor: pointer; /* 鼠标悬停时显示手形指针 */ } .right-icons span { margin: 0 5px; /* 调整图标之间的间距 */ } .icon-space { margin-right: 10px; /* 两张图片之间的距离 */ width:15px; } .icon-space:last-child { margin-right: 0; /* 确保最后一张图片没有右边距 */ } .playlist-wrapper { max-height: 300px; /* 固定高度 */ overflow-y: auto; /* 自动显示滚动条 */ position: relative; } /* 设置滚动条宽度 */ .playlist-wrapper::-webkit-scrollbar { width: 6px; /* 垂直滚动条宽度 */ height: 6px; /* 水平滚动条高度 */ } /* 滚动条轨道 */ .playlist-wrapper::-webkit-scrollbar-track { background: #f1f1f1; } /* 滚动条滑块 */ .playlist-wrapper::-webkit-scrollbar-thumb { background: #888; border-radius: 4px; /* 圆角 */ } /* 当悬停时的滚动条颜色 */ .playlist-wrapper::-webkit-scrollbar-thumb:hover { background: #555; } .playlist { list-style-type: none; padding: 0; margin: 0; } .playlist li { padding: 10px; border-bottom: 1px solid #eee; cursor: pointer; transition: background-color 0.3s, color 0.3s; display: flex; align-items: center; justify-content: space-between; width:300px; } .playlist li .track-info { display: flex; align-items: center; flex: 1; } .playlist li .track-info img { width: 30px; height: 30px; border-radius: 50%; margin-right: 10px; cursor: pointer; /* 添加指针光标以表明可点击 */ } .playlist li .track-info .track-details { display: flex; flex-direction: column; justify-content: center; flex: 1; /* 使 track-details 占据足够宽度 */ } .playlist li .track-info .track-details { display: flex; flex-direction: row; justify-content: space-between; align-items: center; flex: 1; } .playlist li .track-info .track-title { font-family: Microsoft YaHei, Microsoft YaHei; font-weight: 540; font-size: 14px; color: #0F0F0F; line-height: 18px; text-align: justify; font-style: normal; text-transform: none; max-width: 200px; /* 设置最大宽度,可以根据实际需求调整 */ white-space: nowrap; /* 防止换行 */ overflow: hidden; text-overflow: ellipsis; /* 超过宽度时显示省略号 */ } .playlist li .track-info .track-author { font-size: 12px; color: #666; margin-right: 30px; white-space: nowrap; /* 防止换行 */ overflow: hidden; text-overflow: ellipsis; /* 超过宽度时显示省略号 */ } .playlist li .track-duration { font-family: Microsoft YaHei, Microsoft YaHei; font-weight: 400; font-size: 12px; color: #999999; line-height: 16px; text-align: right; font-style: normal; padding-right:10px; text-transform: none; } .playlist li:last-child { border-bottom: none; } .playlist li:hover { background-color: #DFDDD0; } .playlist li.active { background-color: #DFDDD0; color: #ffffff; } .playlist li .track-info { display: flex; align-items: center; } .playlist li img { width:15px; } .audio-player-container { padding: 5px; width: 1200px; /* 设置宽度 */ display: flex; flex-direction: column; } .audio-player-controls { display: flex; align-items: center; justify-content: center; width: 100%; } .audio-player-controls button { background: none; /* 去掉背景色 */ border: none; /* 去掉边框 */ padding: 0; /* 去掉内边距 */ margin: 0 10px; /* 按钮间距 */ cursor: pointer; /* 鼠标悬停时显示手型 */ /* display: inline-flex;*/ /* 保持图片大小 */ align-items: center; /* 垂直居中对齐图片 */ justify-content: center; /* 水平居中对齐图片 */ } .audio-player-controls button img { width: 18px; height: 18px; border-radius: 0px 0px 0px 0px; } /* 可选:悬停时添加效果 */ .audio-player-controls button:hover img { opacity: 0.8; /* 悬停时减少不透明度 */ } .progress-container { display: flex; flex-direction: column; width: 100%; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; position: relative; } .progressBackground { height: 4px; background-color: #D4D1BB; /* 未播放部分的颜色 */ width: 100%; border-radius: 2px; position: absolute; cursor: pointer; /* 鼠标悬停时显示手型 */ top: 22px; left: 0; } .progress { height: 4px; background-color: #5D6146; /* 播放中的颜色 */ width: 0%; /* 初始宽度为0% */ border-radius: 2px; position: absolute; cursor: pointer; /* 鼠标悬停时显示手型 */ top: 22px; left: 0; transition: width 0.1s; /* 平滑过渡 */ } /* 播放点球形 */ .progressBall { position: absolute; width: 6px; /* 球的直径 */ height: 6px; background-color: #5D6146; /* 球的颜色 */ border: 2px solid #5D6146; /* 边框颜色 */ border-radius: 50%; /* 圆形 */ top: 19px; /* 垂直位置调整,使球位于进度条正上方 */ left: 0; cursor: pointer; /* 鼠标悬停时显示手型 */ transition: left 0.1s; /* 使球的移动平滑 */ z-index: 1; /* 保证球形在其他元素之上 */ } .time-info { font-size: 12px; /* 时间信息字体大小 */ display: flex; cursor: pointer; /* 鼠标悬停时显示手型 */ justify-content: space-between; /* 左右对齐 */ width: 100%; margin-bottom: 4px; /* 时间信息和进度条之间的间隙 */ } .time-infoleft, .time-inforight { font-size: 12px; /* 时间信息字体大小 */ color: #333; /* 时间信息字体颜色 */ } .time-infoleft { flex-direction: column; } .time-inforight { display: flex; flex-direction: column; text-align: right; /* 右对齐 */ } .volume-controls { display: flex; align-items: center; margin-top: 5px; } .volume-control { display: flex; align-items: center; margin-top: 0px; margin-left: 15px; } .volume-control input[type="range"] { width: 60px; margin-left: 4px; -webkit-appearance: none; background: #D4D1BB; /* 默认背景颜色 */ height: 2px; border-radius: 2px; cursor: pointer; position: relative; } .volume-control input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 4px; height: 4px; background: #5D6146; /* 默认滑块颜色 */ border-radius: 50%; cursor: pointer; position: relative; z-index: 1; } .volume-control input[type="range"]::-moz-range-thumb { width: 4px; height: 2px; background: #5D6146; border-radius: 50%; cursor: pointer; } .volume-control span img { width:15px; } .speed-controls { position: absolute; bottom: 55px; /*让选择框出现在播放按钮上方,可以根据需要调整*/ background-color: white; /*背景颜色 */ border: 1px solid #ccc; border-radius: 4px; height: 290px; width: 90px; z-index: 10; /*确保在播放器之上 */ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /*添加阴影效果 */ display: none; right: 110px; z-index: 1000; /* 确保在其他元素之上 */ } .speed-options { list-style: none; /* 去掉列表项前的标记 */ padding: 0; margin: 0; background-color: #fff; /* 背景颜色 */ border: 1px solid #ddd; /* 边框颜色 */ border-radius: 5px; /* 边角圆润 */ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* 阴影效果 */ overflow-y: auto; /* 自动出现滚动条 */ position: absolute; /* 定位 */ height: 300px; width: 90px; } .speed-options li { font-size: 14px; padding: 10px; cursor: pointer; /* 鼠标悬停时显示手型 */ width: 70px; } .speed-options li.selected { background-color: #DFDDD0; /* 选中项背景颜色 */ } .speed-options li:hover { background-color: #DFDDD0; /* 悬停项背景颜色 */ } .audio-player-controls { position: relative; /*让播放按钮成为参照对象 */ } .play-mode { position: absolute; bottom: 45px; /*让选择框出现在播放按钮上方,可以根据需要调整*/ background-color: white; /*背景颜色 */ border: 1px solid #ccc; border-radius: 4px; height: 168px; width: 130px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /*添加阴影效果 */ display: none; right: 120px; z-index: 1000; /* 确保在其他元素之上 */ } .close-button { position: absolute; width: 38px; /* 按钮的宽度 */ height: 38px; /* 按钮的高度 */ display: flex; align-items: center; justify-content: center; cursor: pointer; bottom: 31px; /*让选择框出现在播放按钮上方,可以根据需要调整*/ right: -50px; z-index: 1000; /* 确保在其他元素之上 */ } .close-button img { width: 100%; /* 图片占满按钮 */ height: auto; } .play-options { list-style: none; /* 去掉列表项前的标记 */ padding: 0; margin: 0; background-color: #fff; /* 背景颜色 */ border: 1px solid #ddd; /* 边框颜色 */ border-radius: 5px; /* 边角圆润 */ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* 阴影效果 */ overflow-y: auto; /* 自动出现滚动条 */ position: absolute; /* 定位 */ height: 168px; width: 130px; } .play-options li { font-size: 13px; padding: 10px; cursor: pointer; /* 鼠标悬停时显示手型 */ width: 110px; } .play-options li.selected { background-color: #DFDDD0; /* 选中项背景颜色 */ } .play-options li:hover { background-color: #DFDDD0; /* 悬停项背景颜色 */ } .list-item { display: flex; align-items: center; /* 垂直居中 */ justify-content: center; /* 水平居中 */ padding: 10px 0; } .icon { margin-right: 15px; vertical-align: middle; /* 确保图片和文字在同一基线上 */ width:21px; } .timenamestr { width: 75px; height: 16px; /* font-family: Microsoft YaHei, Microsoft YaHei;*/ font-weight: 600; font-size: 12px; line-height: 16px; text-align: justify; font-style: normal; text-transform: none; } .time-langsong { /* font-family: Microsoft YaHei, Microsoft YaHei;*/ font-size: 11px; }