swiper实现带列表卡片层叠音乐播放器代码
代码语言:html
所属分类:多媒体
代码描述:swiper实现带列表卡片层叠音乐播放器代码,可上下切换曲目,可控制进度、音量调节。
代码标签: swiper 列表 层叠 音乐 播放器 代码 卡片
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.4.0.css">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/swiper-bundle.11.0.4.css">
<style>
@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Permanent+Marker&display=swap");
:root {
--light-clr: #e5e5e5;
--primary-clr: #6490f6;
--secondary-clr: #c1daff;
--active-clr: rgba(149, 153, 186, 0.4);
--player-bg: rgba(5, 9, 51, 0.4);
--scrollbar-track: rgb(79, 78, 78);
--scrollbar-thumb: rgb(116, 116, 116);
}
*,
*::before,
*::after {
box-sizing: border-box;
padding: 0;
margin: 0;
}
img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
user-select: none;
}
h1 {
font-size: clamp(0.8rem, 3vw, 1rem);
}
p {
font-size: clamp(0.7rem, 3vw, 1rem);
}
body {
font-family: "Nunito", sans-serif;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
background: #001124;
background-image: url(//repo.bfw.wiki/bfwrepo/image/65c5677a6974b.png);
background-repeat: no-repeat;
background-size: cover;
}
main {
position: relative;
width: 90%;
height: 90%;
background: transparent;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
border-radius: 15px;
overflow: hidden;
}
main::after,
main::before {
content: "";
position: absolute;
width: 250px;
aspect-ratio: 1/1;
border-radius: 50%;
transition: 5s ease-in-out;
}
main::after {
top: -3%;
left: -5%;
transform: scale(1);
background-color: #5768af;
}
main:hover::after {
left: 85%;
transform: scale(1.2);
background-color: #a0acbd;
}
main::before {
bottom: -3%;
right: -5%;
transform: scale(1);
background-color: #ab4c72;
}
main:hover::before {
right: 85%;
transform: scale(1.2);
background-color: #bda5ad;
}
/** CONTENT */
.content {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
display: grid;
grid-template-columns: 100%;
place-items: center;
background: rgba(53, 54, 72, 0.2);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.5);
border-radius: inherit;
box-shadow: 0 0.5px 0 1px rgba(255, 255, 255, 0.2) inset,
0 1px 0 0 rgba(255, 255, 255, 0.6) inset, 0 4px 16px rgba(0, 0, 0, 0.1);
z-index: 10;
color: var(--light-clr);
overflow-y: auto;
padding: 30px 30px 10px;
}
.content::-webkit-scrollbar {
width: 7px;
}
.content::-webkit-scrollbar-track {
box-shadow: inset 0 0 0.3rem var(--scrollbar-track);
border-radius: 40px;
margin: 18px 0;
}
.content::-webkit-scrollbar-thumb {
box-shadow: inset 0 0 0.5rem var(--scrollbar-thumb);
background-color: var(--primary-clr);
outline: none;
border-radius: 40px;
}
/** PLAYLIST */
.slider-playlist {
display: grid;
grid-template-columns: 45% 55%;
align-items: center;
}
/** Slider */
.swiper {
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0