plyr自定义视频播放器皮肤主题效果代码

代码语言:html

所属分类:多媒体

代码描述:plyr自定义视频播放器皮肤主题效果代码

代码标签: plyr 电影 视频 播放器 皮肤 主题

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">



    <style>
        @charset "UTF-8";
        @-webkit-keyframes plyr-progress {
          to {
            background-position: 25px 0;
          }
        }
        @keyframes plyr-progress {
          to {
            background-position: 25px 0;
          }
        }
        .plyr {
          position: relative;
          max-width: 100%;
          min-width: 200px;
          font-family: Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;
          direction: ltr;
        }
        .plyr,
        .plyr *,
        .plyr *::after,
        .plyr *::before {
          box-sizing: border-box;
        }
        .plyr a,
        .plyr button,
        .plyr input,
        .plyr label {
          touch-action: manipulation;
        }
        .plyr:focus {
          outline: 0;
        }
        .plyr video,
        .plyr audio {
          width: 100%;
          height: auto;
          vertical-align: middle;
          border-radius: inherit;
        }
        .plyr input[type=range] {
          display: block;
          height: 20px;
          width: 100%;
          margin: 0;
          padding: 0;
          vertical-align: middle;
          -webkit-appearance: none;
             -moz-appearance: none;
                  appearance: none;
          cursor: pointer;
          border: none;
          background: transparent;
        }
        .plyr input[type=range]::-webkit-slider-runnable-track {
          height: 8px;
          background: transparent;
          border: 0;
          border-radius: 4px;
          -webkit-user-select: none;
                  user-select: none;
        }
        .plyr input[type=range]::-webkit-slider-thumb {
          -webkit-appearance: none;
          margin-top: -4px;
          position: relative;
          height: 16px;
          width: 16px;
          background: #fff;
          border: 2px solid transparent;
          border-radius: 100%;
          -webkit-transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
          transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
          box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.15);
          box-sizing: border-box;
        }
        .plyr input[type=range]::-moz-range-track {
          height: 8px;
          background: transparent;
          border: 0;
          border-radius: 4px;
          -moz-user-select: none;
               user-select: none;
        }
        .plyr input[type=range]::-moz-range-thumb {
          position: relative;
          height: 16px;
          width: 16px;
          background: #fff;
          border: 2px solid transparent;
          border-radius: 100%;
          -moz-transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
          transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
          box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.15);
          box-sizing: border-box;
        }
        .plyr input[type=range]::-ms-track {
          height: 8px;
          background: transparent;
          border: 0;
          color: transparent;
        }
        .plyr input[type=range]::-ms-fill-upper {
          height: 8px;
          background: transparent;
          border: 0;
          border-radius: 4px;
          -ms-user-select: none;
              user-select: none;
        }
        .plyr input[type=range]::-ms-fill-lower {
          height: 8px;
          background: transparent;
          border: 0;
          border-radius: 4px;
          -ms-user-select: none;
              user-select: none;
          background: #f7bc15;
        }
        .plyr input[type=range]::-ms-thumb {
          position: relative;
          height: 16px;
          width: 16px;
          background: #fff;
          border: 2px solid transparent;
          border-radius: 100%;
          -ms-transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
          transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
          box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.15);
          box-sizing: border-box;
          margin-top: 0;
        }
        .plyr input[type=range]::-ms-tooltip {
          display: none;
        }
        .plyr input[type=range]:focus {
          outline: 0;
        }
        .plyr input[type=range]::-moz-focus-outer {
          border: 0;
        }
        .plyr input[type=range].tab-focus:focus {
          outline-offset: 3px;
        }
        .plyr input[type=range]:active::-webkit-slider-thumb {
          background: #f7bc15;
          border-color: #fff;
          transform: scale(1.25);
        }
        .plyr input[type=range]:active::-moz-range-thumb {
          background: #f7bc15;
          border-color: #fff;
          transform: scale(1.25);
        }
        .plyr input[type=range]:active::-ms-thumb {
          background: #f7bc15;
          border-color: #fff;
          transform: scale(1.25);
        }
        
        .plyr--video input[type=range].tab-focus:focus {
          outline: 1px dotted rgba(255, 255, 255, 0.5);
        }
        
        .plyr--audio input[type=range].tab-focus:focus {
          outline: 1px dotted rgba(86, 93, 100, 0.5);
        }
        
        .plyr__sr-only {
          clip: rect(1px, 1px, 1px, 1px);
          overflow: hidden;
          position: absolute !important;
          padding: 0 !important;
          border: 0 !important;
          height: 1px !important;
          width: 1px !important;
        }
        
        .plyr__video-wrapper {
          position: relative;
          background: #000;
          border-radius: inherit;
        }
        
        .plyr__video-embed {
          padding-bottom: 56.25%;
          /* 16:9 */
          height: 0;
          border-radius: inherit;
          overflow: hidden;
          z-index: 0;
        }
        .plyr__video-embed iframe {
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          border: 0;
          -webkit-user-select: none;
             -moz-user-select: none;
              -ms-user-select: none;
                  user-select: none;
        }
        .plyr__video-embed > div {
          position: relative;
          padding-bottom: 200%;
          transform: translateY(-35.95%);
        }
        
        .plyr .plyr__video-embed iframe {
          pointer-events: none;
        }
        
        .plyr video::-webkit-media-text-track-container {
          display: none;
        }
        
        .plyr__captions {
          display: none;
          position: absolute;
          bottom: 0;
          left: 0;
          width: 100%;
          padding: 20px;
          transform: translateY(-60px);
          transition: transform 0.3s ease;
          color: #fff;
          font-size: 16px;
          text-align: center;
          font-weight: 400;
        }
        .plyr__captions span {
          border-radius: 2px;
          padding: 3px 10px;
          background: rgba(0, 0, 0, 0.7);
          -webkit-box-decoration-break: clone;
                  box-decoration-break: clone;
          line-height: 150%;
        }
        .plyr__captions span:empty {
       .........完整代码请登录后点击上方下载按钮下载查看

网友评论0