audioplayer.css 9.1 KB

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