折叠效果音乐播放器效果

代码语言:html

所属分类:多媒体

代码描述:折叠效果音乐播放器效果

代码标签: 播放器 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">


<style>
html {
  width: 100%;
  height: 100%;
}

body {
  width: 100%;
  height: 100%;
  background-color: #76736e;
  *zoom: 1;
  filter: progid:DXImageTransform.Microsoft.gradient(gradientType=1, startColorstr='#FF76736E', endColorstr='#FF323230');
  background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IiIgcj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIxJSIgc3RvcC1jb2xvcj0iIzc2NzM2ZSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzMyMzIzMCIvPjwvcmFkaWFsR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
  background-size: 100%;
  background-image: radial-gradient(ellipse cover at center, #76736e 1%, #323230 100%);
}

.wrapper {
  width: 100%;
  height: 100%;
  display: -webkit-box;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
          flex-direction: column;
  -webkit-box-align: center;
          align-items: center;
  -webkit-box-pack: center;
          justify-content: center;
}

.music-container {
  display: -webkit-box;
  display: flex;
  position: relative;
  width: 400px;
  height: 400px;
  box-shadow: 0px 40px 26px -10px rgba(0, 0, 0, 0.49);
}
.music-container .flip-card {
  -webkit-transform: rotateY(0);
          transform: rotateY(0);
}
.no-touch .music-container:hover .flip-card, .music-container.is-hovering .flip-card {
  -webkit-transform: rotateY(-60deg);
          transform: rotateY(-60deg);
}

.cover {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-perspective-origin: 50% 50%;
          perspective-origin: 50% 50%;
  -webkit-perspective: 1200px;
          perspective: 1200px;
  pointer-events: none;
}
.cover img {
  height: 100%;
}
.cover .flip-card,
.cover .static-card {
  position: absolute;
  width: 50%;
  height: calc(100% - 14px);
  overflow: hidden;
  border: 7px solid #fff;
}
.cover .static-card {
  border-right: none;
}
.cover .flip-card {
  border-left: none;
  margin-left: 50%;
  -webkit-transform-origin: 0% 50%;
          transform-origin: 0% 50%;
  -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.45, 0, 0.55, 1);
  transition: -webkit-transform 0.5s cubic-bezier(0.45, 0, 0.55, 1);
  transition: transform 0.5s cubic-bezier(0.45, 0, 0.55, 1);
  transition: transform 0.5s cubic-bezier(0.45, 0, 0.55, 1), -webkit-transform 0.5s cubic-bezier(0.45, 0, 0.55, 1);
}
.cover .flip-card:before {
  position: absolute;
  content: '';
  width: 100%;
  height: 100%;
  top: 0;
  right: -20px;
  box-shadow: 29px 0px 52px 6px #bababa;
}
.cover .flip-card img {
  position: absolute;
  background-color: #fff;
  right: 0;
}

.controls {
  position: absolute;
  right: 0;
  width: 20%;
  height: 100%;
  overflow: hidden;
  display: -webkit-box;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
          flex-direction: column;
  cursor: pointer;
}
.controls:after {
  position: absolute;
  content: '';
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  box-shadow: inset 20px 0px 37px -10px rgba(0, 0, 0, 0.75);
  pointer-events: none;
  -webkit-transition: width 0.5s cubic-bezier(0.45, 0, 0.55, 1);
  transition: width 0.5s cubic-bezier(0.45, 0, 0.55, 1);
}
.controls input[type="radio"] {
  position: absolute;
  left: -1000px;
}
.controls label {
  -webkit-box-flex: 1;
          flex-grow: 1;
  display: block;
  width: 100%;
  border-top: 1px #e6e6e6 solid;
  border-bottom: 1px #9c9c9c solid;
  box-sizing: border-box;
  cursor: pointer;
  background-color: #dcdcdc;
  *zoom: 1;
  filter: progid:DXImageTransform.Microsoft.gradient(gradientType=1, startColorstr='#FFDCDCDC', endColorstr='#FFF8F8F6');
  background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjEuMCIgeDI9IjEuMCIgeTI9IjAuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RjZGNkYyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Y4ZjhmNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
  background-size: 100%;
  background-image: -webkit-gradient(linear, left bottom, right top, from(#dcdcdc), to(#f8f8f6));
  background-image: linear-gradient(to right top, #dcdcdc 0%, #f8f8f6 100%);
}
.controls label span {
  background-repeat: no-repeat;
  background-position: 16px 42px;
  width: 80px;
  height: 125px;
  display: block;
  pointer-events: none;
}
.controls input:checked + label,
.controls label:active {
  background-color: #BCBCBC;
  *zoom: 1;
  filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFD5D5D5', endColorstr='#FFF8F8F6');
  background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI.........完整代码请登录后点击上方下载按钮下载查看

网友评论0