|
| 1 | +html { |
| 2 | + box-sizing: border-box; |
| 3 | +} |
| 4 | + |
| 5 | +*, *:before, *:after { |
| 6 | + box-sizing: inherit; |
| 7 | +} |
| 8 | + |
| 9 | +body { |
| 10 | + margin: 0; |
| 11 | + padding: 0; |
| 12 | + display:flex; |
| 13 | + background:#7A419B; |
| 14 | + min-height:100vh; |
| 15 | + background: linear-gradient(135deg, #7c1599 0%,#921099 48%,#7e4ae8 100%); |
| 16 | + background-size:cover; |
| 17 | + align-items: center; |
| 18 | + justify-content: center; |
| 19 | +} |
| 20 | + |
| 21 | +.player { |
| 22 | + max-width:750px; |
| 23 | + border:5px solid rgba(0,0,0,0.2); |
| 24 | + box-shadow:0 0 20px rgba(0,0,0,0.2); |
| 25 | + position: relative; |
| 26 | + font-size: 0; |
| 27 | + overflow: hidden; |
| 28 | +} |
| 29 | + |
| 30 | +/* This css is only applied when fullscreen is active. */ |
| 31 | +.player:fullscreen { |
| 32 | + max-width: none; |
| 33 | + width: 100%; |
| 34 | +} |
| 35 | + |
| 36 | +.player:-webkit-full-screen { |
| 37 | + max-width: none; |
| 38 | + width: 100%; |
| 39 | +} |
| 40 | + |
| 41 | +.player__video { |
| 42 | + width: 100%; |
| 43 | +} |
| 44 | + |
| 45 | +.player__button { |
| 46 | + background:none; |
| 47 | + border:0; |
| 48 | + line-height:1; |
| 49 | + color:white; |
| 50 | + text-align: center; |
| 51 | + outline:0; |
| 52 | + padding: 0; |
| 53 | + cursor:pointer; |
| 54 | + max-width:50px; |
| 55 | +} |
| 56 | + |
| 57 | +.player__button:focus { |
| 58 | + border-color: #ffc600; |
| 59 | +} |
| 60 | + |
| 61 | +.player__slider { |
| 62 | + width:10px; |
| 63 | + height:30px; |
| 64 | +} |
| 65 | + |
| 66 | +.player__controls { |
| 67 | + display:flex; |
| 68 | + position: absolute; |
| 69 | + bottom:0; |
| 70 | + width: 100%; |
| 71 | + transform: translateY(100%) translateY(-5px); |
| 72 | + transition:all .3s; |
| 73 | + flex-wrap:wrap; |
| 74 | + background:rgba(0,0,0,0.1); |
| 75 | +} |
| 76 | + |
| 77 | +.player:hover .player__controls { |
| 78 | + transform: translateY(0); |
| 79 | +} |
| 80 | + |
| 81 | +.player:hover .progress { |
| 82 | + height:15px; |
| 83 | +} |
| 84 | + |
| 85 | +.player__controls > * { |
| 86 | + flex:1; |
| 87 | +} |
| 88 | + |
| 89 | +.progress { |
| 90 | + flex:10; |
| 91 | + position: relative; |
| 92 | + display:flex; |
| 93 | + flex-basis:100%; |
| 94 | + height:5px; |
| 95 | + transition:height 0.3s; |
| 96 | + background:rgba(0,0,0,0.5); |
| 97 | + cursor:ew-resize; |
| 98 | +} |
| 99 | + |
| 100 | +.progress__filled { |
| 101 | + width:50%; |
| 102 | + background:#ffc600; |
| 103 | + flex:0; |
| 104 | + flex-basis:50%; |
| 105 | +} |
| 106 | + |
| 107 | +/* unholy css to style input type="range" */ |
| 108 | + |
| 109 | +input[type=range] { |
| 110 | + -webkit-appearance: none; |
| 111 | + background:transparent; |
| 112 | + width: 100%; |
| 113 | + margin: 0 5px; |
| 114 | +} |
| 115 | +input[type=range]:focus { |
| 116 | + outline: none; |
| 117 | +} |
| 118 | +input[type=range]::-webkit-slider-runnable-track { |
| 119 | + width: 100%; |
| 120 | + height: 8.4px; |
| 121 | + cursor: pointer; |
| 122 | + box-shadow: 1px 1px 1px rgba(0, 0, 0, 0), 0 0 1px rgba(13, 13, 13, 0); |
| 123 | + background: rgba(255,255,255,0.8); |
| 124 | + border-radius: 1.3px; |
| 125 | + border: 0.2px solid rgba(1, 1, 1, 0); |
| 126 | +} |
| 127 | +input[type=range]::-webkit-slider-thumb { |
| 128 | + height: 15px; |
| 129 | + width: 15px; |
| 130 | + border-radius: 50px; |
| 131 | + background: #ffc600; |
| 132 | + cursor: pointer; |
| 133 | + -webkit-appearance: none; |
| 134 | + margin-top: -3.5px; |
| 135 | + box-shadow:0 0 2px rgba(0,0,0,0.2); |
| 136 | +} |
| 137 | +input[type=range]:focus::-webkit-slider-runnable-track { |
| 138 | + background: #bada55; |
| 139 | +} |
| 140 | +input[type=range]::-moz-range-track { |
| 141 | + width: 100%; |
| 142 | + height: 8.4px; |
| 143 | + cursor: pointer; |
| 144 | + box-shadow: 1px 1px 1px rgba(0, 0, 0, 0), 0 0 1px rgba(13, 13, 13, 0); |
| 145 | + background: #ffffff; |
| 146 | + border-radius: 1.3px; |
| 147 | + border: 0.2px solid rgba(1, 1, 1, 0); |
| 148 | +} |
| 149 | +input[type=range]::-moz-range-thumb { |
| 150 | + box-shadow: 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(13, 13, 13, 0); |
| 151 | + height: 15px; |
| 152 | + width: 15px; |
| 153 | + border-radius: 50px; |
| 154 | + background: #ffc600; |
| 155 | + cursor: pointer; |
| 156 | +} |
0 commit comments