Nessuna descrizione

audioplayer.css 8.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. /*audioplayer*/
  2. body{
  3. margin: 0;
  4. padding: 0;
  5. }
  6. .container{
  7. padding: 100px 50px;
  8. }
  9. #audio_player{
  10. width: 100%;
  11. }
  12. .audioplayer {
  13. height: 2.5em;
  14. /* 40 */
  15. color: #fff;
  16. text-shadow: 1px 1px 0 #000;
  17. border: 1px solid #222;
  18. position: relative;
  19. z-index: 1;
  20. background: #333;
  21. }
  22. /* mini mode (fallback) */
  23. .audioplayer-mini {
  24. width: 2.5em;
  25. /* 40 */
  26. margin: 0 auto;
  27. }
  28. /* player elements: play/pause and volume buttons, played/duration timers, progress bar of loaded/played */
  29. .audioplayer>div {
  30. position: absolute;
  31. }
  32. /* play/pause button */
  33. .audioplayer-playpause {
  34. width: 2.5em;
  35. /* 40 */
  36. height: 100%;
  37. text-align: left;
  38. text-indent: -9999px;
  39. cursor: pointer;
  40. z-index: 2;
  41. top: 0;
  42. left: 0;
  43. }
  44. .audioplayer:not(.audioplayer-mini) .audioplayer-playpause {
  45. border-right: 1px solid #555;
  46. border-right-color: rgba( 255, 255, 255, .1);
  47. }
  48. .audioplayer-mini .audioplayer-playpause {
  49. width: 100%;
  50. }
  51. .audioplayer-playpause:hover,
  52. .audioplayer-playpause:focus {
  53. background-color: #222;
  54. }
  55. .audioplayer-playpause a {
  56. display: block;
  57. }
  58. .audioplayer-stopped .audioplayer-playpause a {
  59. width: 0;
  60. height: 0;
  61. border: 0.5em solid transparent;
  62. /* 8 */
  63. border-right: none;
  64. border-left-color: #fff;
  65. content: '';
  66. position: absolute;
  67. top: 50%;
  68. left: 50%;
  69. margin: -0.5em 0 0 -0.25em;
  70. /* 8 4 */
  71. }
  72. .audioplayer-playing .audioplayer-playpause a {
  73. width: 0.75em;
  74. /* 12 */
  75. height: 0.75em;
  76. /* 12 */
  77. position: absolute;
  78. top: 50%;
  79. left: 50%;
  80. margin: -0.375em 0 0 -0.375em;
  81. /* 6 */
  82. }
  83. .audioplayer-playing .audioplayer-playpause a:before,
  84. .audioplayer-playing .audioplayer-playpause a:after {
  85. width: 40%;
  86. height: 100%;
  87. background-color: #fff;
  88. content: '';
  89. position: absolute;
  90. top: 0;
  91. }
  92. .audioplayer-playing .audioplayer-playpause a:before {
  93. left: 0;
  94. }
  95. .audioplayer-playing .audioplayer-playpause a:after {
  96. right: 0;
  97. }
  98. /* timers */
  99. .audioplayer-time {
  100. width: 4.375em;
  101. /* 70 */
  102. height: 100%;
  103. line-height: 2.375em;
  104. /* 38 */
  105. text-align: center;
  106. z-index: 2;
  107. top: 0;
  108. }
  109. .audioplayer-time-current {
  110. border-left: 1px solid #111;
  111. border-left-color: rgba( 0, 0, 0, .25);
  112. left: 2.5em;
  113. /* 40 */
  114. }
  115. .audioplayer-time-duration {
  116. border-right: 1px solid #555;
  117. border-right-color: rgba( 255, 255, 255, .1);
  118. right: 2.5em;
  119. /* 40 */
  120. }
  121. .audioplayer-novolume .audioplayer-time-duration {
  122. border-right: 0;
  123. right: 0;
  124. }
  125. /* progress bar of loaded/played */
  126. .audioplayer-bar {
  127. height: 0.875em;
  128. /* 14 */
  129. background-color: #222;
  130. cursor: pointer;
  131. z-index: 1;
  132. top: 50%;
  133. right: 6.875em;
  134. /* 110 */
  135. left: 6.875em;
  136. /* 110 */
  137. margin-top: -0.438em;
  138. /* 7 */
  139. }
  140. .audioplayer-novolume .audioplayer-bar {
  141. right: 4.375em;
  142. /* 70 */
  143. }
  144. .audioplayer-bar div {
  145. width: 0;
  146. height: 100%;
  147. position: absolute;
  148. left: 0;
  149. top: 0;
  150. }
  151. .audioplayer-bar-loaded {
  152. background-color: #333;
  153. z-index: 1;
  154. }
  155. .audioplayer-bar-played {
  156. background: #007fd1;
  157. z-index: 2;
  158. }
  159. /* volume button */
  160. .audioplayer-volume {
  161. width: 2.5em;
  162. /* 40 */
  163. height: 100%;
  164. border-left: 1px solid #111;
  165. border-left-color: rgba( 0, 0, 0, .25);
  166. text-align: left;
  167. text-indent: -9999px;
  168. cursor: pointer;
  169. z-index: 2;
  170. top: 0;
  171. right: 0;
  172. }
  173. .audioplayer-volume:hover,
  174. .audioplayer-volume:focus {
  175. background-color: #222;
  176. }
  177. .audioplayer-volume-button {
  178. width: 100%;
  179. height: 100%;
  180. }
  181. .audioplayer-volume-button a {
  182. width: 0.313em;
  183. /* 5 */
  184. height: 0.375em;
  185. /* 6 */
  186. background-color: #fff;
  187. display: block;
  188. position: relative;
  189. z-index: 1;
  190. top: 40%;
  191. left: 35%;
  192. }
  193. .audioplayer-volume-button a:before,
  194. .audioplayer-volume-button a:after {
  195. content: '';
  196. position: absolute;
  197. }
  198. .audioplayer-volume-button a:before {
  199. width: 0;
  200. height: 0;
  201. border: 0.5em solid transparent;
  202. /* 8 */
  203. border-left: none;
  204. border-right-color: #fff;
  205. z-index: 2;
  206. top: 50%;
  207. right: -0.25em;
  208. margin-top: -0.5em;
  209. /* 8 */
  210. }
  211. .audioplayer:not(.audioplayer-muted) .audioplayer-volume-button a:after {
  212. /* "volume" icon by Nicolas Gallagher, http://nicolasgallagher.com/pure-css-gui-icons */
  213. width: 0.313em;
  214. /* 5 */
  215. height: 0.313em;
  216. /* 5 */
  217. border: 0.25em double #fff;
  218. /* 4 */
  219. border-width: 0.25em 0.25em 0 0;
  220. /* 4 */
  221. left: 0.563em;
  222. /* 9 */
  223. top: -0.063em;
  224. /* 1 */
  225. -webkit-border-radius: 0 0.938em 0 0;
  226. /* 15 */
  227. -moz-border-radius: 0 0.938em 0 0;
  228. /* 15 */
  229. border-radius: 0 0.938em 0 0;
  230. /* 15 */
  231. -webkit-transform: rotate( 45deg);
  232. -moz-transform: rotate( 45deg);
  233. -ms-transform: rotate( 45deg);
  234. -o-transform: rotate( 45deg);
  235. transform: rotate( 45deg);
  236. }
  237. /* volume dropdown */
  238. .audioplayer-volume-adjust {
  239. height: 6.25em;
  240. /* 100 */
  241. cursor: default;
  242. position: absolute;
  243. left: 0;
  244. right: -1px;
  245. top: -9999px;
  246. background: #333;
  247. }
  248. .audioplayer-volume:not(:hover) .audioplayer-volume-adjust {
  249. opacity: 0;
  250. }
  251. .audioplayer-volume:hover .audioplayer-volume-adjust {
  252. top: auto;
  253. bottom: 100%;
  254. }
  255. .audioplayer-volume-adjust>div {
  256. width: 40%;
  257. height: 80%;
  258. background-color: #222;
  259. cursor: pointer;
  260. position: relative;
  261. z-index: 1;
  262. margin: 30% auto 0;
  263. }
  264. .audioplayer-volume-adjust div div {
  265. width: 100%;
  266. height: 100%;
  267. position: absolute;
  268. bottom: 0;
  269. left: 0;
  270. background: #007fd1;
  271. }
  272. .audioplayer-novolume .audioplayer-volume {
  273. display: none;
  274. }
  275. /* CSS3 decorations */
  276. body {
  277. -webkit-box-shadow: inset 0 0 18.75em rgba( 0, 0, 0, .5);
  278. /* 300 */
  279. -moz-box-shadow: inset 0 0 18.75em rgba( 0, 0, 0, 5);
  280. /* 300 */
  281. box-shadow: inset 0 0 18.75em rgba( 0, 0, 0, .5);
  282. /* 300 */
  283. }
  284. .audioplayer {
  285. -webkit-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, .15), 0 0 1.25em rgba( 0, 0, 0, .5);
  286. /* 20 */
  287. -moz-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, .15), 0 0 1.25em rgba( 0, 0, 0, .5);
  288. /* 20 */
  289. box-shadow: inset 0 1px 0 rgba( 255, 255, 255, .15), 0 0 1.25em rgba( 0, 0, 0, .5);
  290. /* 20 */
  291. }
  292. .audioplayer-volume-adjust {
  293. -webkit-box-shadow: -2px -2px 2px rgba( 0, 0, 0, .15), 2px -2px 2px rgba( 0, 0, 0, .15);
  294. -moz-box-shadow: -2px -2px 2px rgba( 0, 0, 0, .15), 2px -2px 2px rgba( 0, 0, 0, .15);
  295. box-shadow: -2px -2px 2px rgba( 0, 0, 0, .15), 2px -2px 2px rgba( 0, 0, 0, .15);
  296. }
  297. .audioplayer-bar,
  298. .audioplayer-volume-adjust>div {
  299. -webkit-box-shadow: -1px -1px 0 rgba( 0, 0, 0, .5), 1px 1px 0 rgba( 255, 255, 255, .1);
  300. -moz-box-shadow: -1px -1px 0 rgba( 0, 0, 0, .5), 1px 1px 0 rgba( 255, 255, 255, .1);
  301. box-shadow: -1px -1px 0 rgba( 0, 0, 0, .5), 1px 1px 0 rgba( 255, 255, 255, .1);
  302. }
  303. .audioplayer-volume-adjust div div,
  304. .audioplayer-bar-played {
  305. -webkit-box-shadow: inset 0 0 5px rgba( 255, 255, 255, .5);
  306. -moz-box-shadow: inset 0 0 5px rgba( 255, 255, 255, .5);
  307. box-shadow: inset 0 0 5px rgba( 255, 255, 255, .5);
  308. }
  309. .audioplayer-playpause,
  310. .audioplayer-volume a {
  311. -webkit-filter: drop-shadow( 1px 1px 0 #000);
  312. -moz-filter: drop-shadow( 1px 1px 0 #000);
  313. -ms-filter: drop-shadow( 1px 1px 0 #000);
  314. -o-filter: drop-shadow( 1px 1px 0 #000);
  315. filter: drop-shadow( 1px 1px 0 #000);
  316. }
  317. .audioplayer,
  318. .audioplayer-volume-adjust {
  319. background: -webkit-gradient( linear, left top, left bottom, from( #444), to( #222));
  320. background: -webkit-linear-gradient( top, #444, #222);
  321. background: -moz-linear-gradient( top, #444, #222);
  322. background: -ms-radial-gradient( top, #444, #222);
  323. background: -o-linear-gradient( top, #444, #222);
  324. background: linear-gradient( to bottom, #444, #222);
  325. }
  326. .audioplayer-bar-played {
  327. background: -webkit-gradient( linear, left top, right top, from( #007fd1), to( #c600ff));
  328. background: -webkit-linear-gradient( left, #007fd1, #c600ff);
  329. background: -moz-linear-gradient( left, #007fd1, #c600ff);
  330. background: -ms-radial-gradient( left, #007fd1, #c600ff);
  331. background: -o-linear-gradient( left, #007fd1, #c600ff);
  332. background: linear-gradient( to right, #007fd1, #c600ff);
  333. }
  334. .audioplayer-volume-adjust div div {
  335. background: -webkit-gradient( linear, left bottom, left top, from( #007fd1), to( #c600ff));
  336. background: -webkit-linear-gradient( bottom, #007fd1, #c600ff);
  337. background: -moz-linear-gradient( bottom, #007fd1, #c600ff);
  338. background: -ms-radial-gradient( bottom, #007fd1, #c600ff);
  339. background: -o-linear-gradient( bottom, #007fd1, #c600ff);
  340. background: linear-gradient( to top, #007fd1, #c600ff);
  341. }
  342. .audioplayer-bar,
  343. .audioplayer-bar div,
  344. .audioplayer-volume-adjust div {
  345. -webkit-border-radius: 4px;
  346. -moz-border-radius: 4px;
  347. border-radius: 4px;
  348. }
  349. .audioplayer {
  350. -webkit-border-radius: 2px;
  351. -moz-border-radius: 2px;
  352. border-radius: 2px;
  353. }
  354. .audioplayer-volume-adjust {
  355. -webkit-border-top-left-radius: 2px;
  356. -webkit-border-top-right-radius: 2px;
  357. -moz-border-radius-topleft: 2px;
  358. -moz-border-radius-topright: 2px;
  359. border-top-left-radius: 2px;
  360. border-top-right-radius: 2px;
  361. }
  362. .audioplayer *,
  363. .audioplayer *:before,
  364. .audioplayer *:after {
  365. -webkit-transition: color .25s ease, background-color .25s ease, opacity .5s ease;
  366. -moz-transition: color .25s ease, background-color .25s ease, opacity .5s ease;
  367. -ms-transition: color .25s ease, background-color .25s ease, opacity .5s ease;
  368. -o-transition: color .25s ease, background-color .25s ease, opacity .5s ease;
  369. transition: color .25s ease, background-color .25s ease, opacity .5s ease;
  370. }