@dcp-designable/components
Version:
公共组件及业务组件
243 lines (210 loc) • 6.27 kB
text/less
.bpm-audio-player-component {
display: flex;
align-items: center;
width: 100%;
justify-content: space-around;
.bpm-audio-player {
display: flex;
align-items: center;
height: 43px;
width: 100%;
color: #ffffff;
padding: 0 10px;
background: #366DE3;
box-shadow: 0 3px 10px 0 #1e68fc33;
border-radius: 40px;
margin: 4px 0;
.bpm-audio-player-play-btn {
display: flex;
justify-content: center;
align-items: center;
width: 28px;
height: 28px;
.play-btn-img {
width: 20px;
height: 20px;
}
}
.audio-play-animation {
margin-left: 4px;
//margin-top: 4px;
animation: fadeInOut 2s infinite;
/* 2 秒的动画周期,无限循环 */
opacity: 0;
/* 初始透明度为 0 */
.play-btn-img {
width: 20px;
height: 20px;
}
}
@keyframes fadeInOut {
0% {
opacity: 0;
}
25% {
opacity: 0.5;
/* 中间透明度为 1 */
}
50% {
opacity: 1;
/* 中间透明度为 1 */
}
75% {
opacity: 0.5;
/* 中间透明度为 1 */
}
100% {
opacity: 0;
}
}
.show {
display: block;
}
.bpm-audio-player-progress {
width: 236px;
}
.bpm-audio-player-line {
flex: 1;
position: relative;
margin-left: 6px;
margin-right: 16px;
margin-bottom: 6px;
.bpm-audio-player-line-back {
width: 100%;
height: 2px;
border-radius: 2px;
}
}
.custom-range {
border-radius: 2px;
-webkit-appearance: none;
/* 移除默认样式 */
appearance: none;
width: 100%;
/* 宽度 */
height: 2px;
/* 轨道高度 */
background: #FFFFFF33;
/* 半透明背景色 */
outline: none;
/* 移除焦点边框 */
opacity: 1;
/* 非透明 */
-webkit-transition: .2s;
/* 平滑过渡 */
transition: opacity .2s;
}
/* Webkit 内核浏览器(如 Chrome 和 Safari)*/
.custom-range::-webkit-slider-thumb {
margin-top: -4px;
-webkit-appearance: none;
/* 移除默认样式 */
appearance: none;
width: 10px;
/* 滑块宽度 */
height: 10px;
/* 滑块高度 */
background: white;
/* 白色滑块 */
cursor: pointer;
/* 指针样式 */
border-radius: 50%;
/* 圆形滑块 */
box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
/* 微小阴影 */
}
/* 激活部分(已选部分)的样式 */
.custom-range::-webkit-slider-runnable-track {
height: 2px;
background: linear-gradient(to right, #ffffff 0%, #ffffff var(--value, 50%), #FFFFFF33 var(--value, 50%));
/* 已激活部分为蓝色,未激活部分为半透明白色 */
}
/* Firefox 浏览器 */
.custom-range::-moz-range-thumb {
width: 10px;
height: 10px;
background: white;
cursor: pointer;
border-radius: 50%;
box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}
.custom-range::-moz-range-track {
height: 2px;
background: linear-gradient(to right, #ffffff 0%, #ffffff var(--value, 50%), #FFFFFF33 var(--value, 50%));
}
/* IE 和 Edge (旧版) */
.custom-range::-ms-thumb {
width: 10px;
height: 10px;
background: white;
cursor: pointer;
border-radius: 50%;
box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}
.custom-range::-ms-fill-lower,
.custom-range::-ms-fill-upper {
background: #ffffff;
/* IE 和 Edge (旧版) 的激活部分颜色 */
}
.custom-range::-ms-track {
background: #FFFFFF33;
// border-color: transparent;
// border-width: 8px 0;
color: transparent;
}
}
.bpm-audio-player-transfer-empty{
width: 60px;
height: 26px;
}
.bpm-audio-player-transfer-btn {
width: 80px;
height: 26px;
background: #00000017;
border-radius: 13px;
margin-left: 8px;
text-align: center;
span {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 12px;
line-height: 26px;
word-break: break-all;
}
}
}
.bpm-audio-player-menu {
display: flex;
//width: 213px;
width: 160px;
height: 60px;
flex-direction: row;
align-items: center;
justify-content: space-around;
.bpm-audio-player-menu-item {
display: flex;
flex-direction: column;
align-items: center;
.bpm-audio-player-menu-item-img {
width: 20px;
height: 20px;
margin-bottom: 5px;
}
}
}
.bpm-audio-player-transfer-card {
background: #FFFFFF;
border-radius: 6px;
height: 100%;
width: 100%;
margin-top:8px;
.bpm-audio-player-transfer-text {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
//color: #0052D9;
letter-spacing: 0;
line-height: 30px;
padding: 10px;
}
}