Advertisement
fr1sk

Untitled

Jun 24th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.81 KB | None | 0 0
  1. body {
  2. font-family: arial, verdana, sans-serif;
  3. font-size: 8px;
  4. background: #1E1E20;
  5. text-align: center;
  6. zoom: 175%;
  7. padding-top: 13%;
  8. }
  9.  
  10. .switch {
  11. display: inline-block;
  12. margin: 10em 2em;
  13. position: relative;
  14. border-radius: 3.5em;
  15. -webkit-box-shadow: 0 0 0.5em rgba(255,255,255,0.2);
  16. -moz-box-shadow: 0 0 0.5em rgba(255,255,255,0.2);
  17. box-shadow: 0 0 0.5em rgba(255,255,255,0.2);
  18. }
  19.  
  20. .switch label {
  21. width: 100%;
  22. height: 100%;
  23. margin: 0;
  24. padding: 0;
  25. display: block;
  26. position: absolute;
  27. top: 0;
  28. left: 0;
  29. z-index: 10;
  30. }
  31.  
  32. .switch input {
  33. display: none;
  34. }
  35.  
  36. .switch span {
  37. display: block;
  38. -webkit-transition: top 0.2s;
  39. -moz-transition: top 0.2s;
  40. -ms-transition: top 0.2s;
  41. -o-transition: top 0.2s;
  42. transition: top 0.2s;
  43. }
  44.  
  45. .switch-border1 {
  46. border: 0.1em solid #000;
  47. border-radius: 3.5em;
  48. -webkit-box-shadow: 0 0.2em rgba(255, 255, 255, 0.2);
  49. -moz-box-shadow: 0 0.2em rgba(255, 255, 255, 0.2);
  50. box-shadow: 0 0.2em rgba(255, 255, 255, 0.2);
  51. }
  52.  
  53. .switch-border2 {
  54. width: 6.6em;
  55. height: 12.6em;
  56. position: relative;
  57. border: 0.1em solid #323232;
  58. background-image: -webkit-gradient(linear, left top, right top, from(#2D2D2D), color-stop(0.5, #4B4B4B), to(#2D2D2D));
  59. background-image: -webkit-linear-gradient(left, #2D2D2D, #4B4B4B, #2D2D2D);
  60. background-image: -moz-linear-gradient(left, #2D2D2D, #4B4B4B, #2D2D2D);
  61. background-image: -ms-linear-gradient(left, #2D2D2D, #4B4B4B, #2D2D2D);
  62. background-image: -o-linear-gradient(left, #2D2D2D, #4B4B4B, #2D2D2D);
  63. background-image: linear-gradient(to right, #2D2D2D, #4B4B4B, #2D2D2D);
  64. border-radius: 3.4em;
  65. }
  66.  
  67. .switch-border2:before,
  68. .switch-border2:after {
  69. content: '';
  70. display: block;
  71. width: 100%;
  72. height: 100%;
  73. position: absolute;
  74. top: 0;
  75. left: 0;
  76. z-index: 0;
  77. opacity: .3;
  78. border-radius: 3.4em;
  79. }
  80.  
  81. .switch-border2:before {
  82. background: -webkit-gradient(linear, left top, left bottom, from(#000), to(rgba(0,0,0,0)));
  83. background: -webkit-linear-gradient(#000, rgba(0,0,0,0));
  84. background: -moz-linear-gradient(#000, rgba(0,0,0,0));
  85. background: -ms-linear-gradient(#000, rgba(0,0,0,0));
  86. background: -o-linear-gradient(#000, rgba(0,0,0,0));
  87. background: linear-gradient(#000, rgba(0,0,0,0));
  88. }
  89.  
  90. .switch-border2:after {
  91. background: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0)), to(#000));
  92. background: -webkit-linear-gradient(rgba(0,0,0,0), #000);
  93. background: -moz-linear-gradient(rgba(0,0,0,0), #000);
  94. background: -ms-linear-gradient(rgba(0,0,0,0), #000);
  95. background: -o-linear-gradient(rgba(0,0,0,0), #000);
  96. background: linear-gradient(rgba(0,0,0,0), #000);
  97. }
  98.  
  99. .switch-top {
  100. width: 100%;
  101. height: 84%;
  102. position: absolute;
  103. top: 8%;
  104. left: 0;
  105. z-index: 1;
  106. background-image: -webkit-gradient(linear, left top, right top, from(#2D2D2D), color-stop(0.5, #4B4B4B), to(#2D2D2D));
  107. background-image: -webkit-linear-gradient(left, #2D2D2D, #4B4B4B, #2D2D2D);
  108. background-image: -moz-linear-gradient(left, #2D2D2D, #4B4B4B, #2D2D2D);
  109. background-image: -ms-linear-gradient(left, #2D2D2D, #4B4B4B, #2D2D2D);
  110. background-image: -o-linear-gradient(left, #2D2D2D, #4B4B4B, #2D2D2D);
  111. background-image: linear-gradient(to right, #2D2D2D, #4B4B4B, #2D2D2D);
  112. border-radius: 3.4em;
  113. }
  114.  
  115. .switch-shadow {
  116. width: 100%;
  117. height: 100%;
  118. position: absolute;
  119. top: 0;
  120. left: 0;
  121. z-index: 2;
  122. border-radius: 3.4em;
  123. -webkit-box-shadow: 0 0 2em black inset;
  124. -moz-box-shadow: 0 0 2em black inset;
  125. box-shadow: 0 0 2em black inset;
  126. }
  127.  
  128. .switch-handle-left,
  129. .switch-handle-right {
  130. content: '';
  131. display: block;
  132. width: 3.6em;
  133. height: 0;
  134. position: absolute;
  135. top: 6.6em;
  136. z-index: 2;
  137. border-bottom: 4.5em solid #111;
  138. border-left: 0.7em solid transparent;
  139. border-right: 0.7em solid transparent;
  140. border-radius: 0;
  141. }
  142.  
  143. .switch-handle-left {
  144. left: 0.8em;
  145. }
  146.  
  147. .switch-handle-right {
  148. right: 0.8em;
  149. }
  150.  
  151. .switch-handle {
  152. width: 3.6em;
  153. height: 4.5em;
  154. position: absolute;
  155. top: 6.6em;
  156. left: 1.5em;
  157. z-index: 3;
  158. background: #333;
  159. background-image: -webkit-gradient(linear, left top, right top, from(#111), color-stop(0.4, #777), color-stop(0.5, #888), color-stop(0.6, #777), to(#111));
  160. background-image: -webkit-linear-gradient(left, #111, #777 40%, #888, #777 60%, #111);
  161. background-image: -moz-linear-gradient(left, #111, #777 40%, #888, #777 60%, #111);
  162. background-image: -ms-linear-gradient(left, #111, #777 40%, #888, #777 60%, #111);
  163. background-image: -o-linear-gradient(left, #111, #777 40%, #888, #777 60%, #111);
  164. background-image: linear-gradient(to right, #111, #777 40%, #888, #777 60%, #111);
  165. border-radius: 0;
  166. }
  167.  
  168. .switch-handle-top {
  169. width: 5em;
  170. height: 5em;
  171. position: absolute;
  172. top: 8.5em;
  173. left: 0.8em;
  174. z-index: 4;
  175. background-color: #555;
  176. background-image: -webkit-gradient(linear, left top, right top, from(#5F5F5F), to(#878787));
  177. background-image: -webkit-linear-gradient(left, #5F5F5F, #878787);
  178. background-image: -moz-linear-gradient(left, #5F5F5F, #878787);
  179. background-image: -ms-linear-gradient(left, #5F5F5F, #878787);
  180. background-image: -o-linear-gradient(left, #5F5F5F, #878787);
  181. background-image: linear-gradient(to right, #5F5F5F, #878787);
  182. border-top: 0.2em solid #AEB2B3;
  183. border-radius: 2.5em;
  184. }
  185.  
  186. .switch-handle-bottom {
  187. width: 3.6em;
  188. height: 3.6em;
  189. position: absolute;
  190. top: 4.7em;
  191. left: 1.5em;
  192. z-index: 3;
  193. background: #333;
  194. background-image: -webkit-gradient(linear, left top, right top, from(#111), color-stop(0.4, #777), color-stop(0.5, #888), color-stop(0.6, #777), to(#111));
  195. background-image: -webkit-linear-gradient(left, #111, #777 40%, #888, #777 60%, #111);
  196. background-image: -moz-linear-gradient(left, #111, #777 40%, #888, #777 60%, #111);
  197. background-image: -ms-linear-gradient(left, #111, #777 40%, #888, #777 60%, #111);
  198. background-image: -o-linear-gradient(left, #111, #777 40%, #888, #777 60%, #111);
  199. background-image: linear-gradient(to right, #111, #777 40%, #888, #777 60%, #111);
  200. border-top: 0.2em solid #141414;
  201. border-radius: 1.8em;
  202. }
  203.  
  204. .switch-handle-base {
  205. width: 4.2em;
  206. height: 4.2em;
  207. position: absolute;
  208. top: 3.8em;
  209. left: 1.2em;
  210. z-index: 2;
  211. border-top: 0.2em solid rgba(255,255,255,0.35);
  212. border-radius: 2.1em;
  213. -webkit-box-shadow: 0 0 0.5em rgba(0,0,0,0.8) inset;
  214. -moz-box-shadow: 0 0 0.5em rgba(0,0,0,0.8) inset;
  215. box-shadow: 0 0 0.5em rgba(0,0,0,0.8) inset;
  216. }
  217.  
  218. .switch-led {
  219. position: absolute;
  220. left: 2em;
  221. border-radius: 1.4em;
  222. }
  223.  
  224. .switch-led-border {
  225. border: 0.2em solid black;
  226. border-radius: 1.3em;
  227. }
  228.  
  229. .switch-led-light {
  230. border-radius: 1.1em;
  231. -webkit-box-shadow: 0 0 0.5em rgba(255,255,255,0.5) inset;
  232. -moz-box-shadow: 0 0 0.5em rgba(255,255,255,0.5) inset;
  233. box-shadow: 0 0 0.5em rgba(255,255,255,0.5) inset;
  234. }
  235.  
  236. .switch-led-glow {
  237. width: 2em;
  238. height: 2em;
  239. position: relative;
  240. border-radius: 1em;
  241. }
  242.  
  243. .switch-led-glow:before {
  244. content: '';
  245. display: block;
  246. width: 0.6em;
  247. height: 0.6em;
  248. position: absolute;
  249. top: 0.3em;
  250. left: 0.7em;
  251. background: rgba(255,255,255,0.2);
  252. border-radius: 0.3em;
  253. -webkit-box-shadow: 0 0 1em rgba(255,255,255,0.75);
  254. -moz-box-shadow: 0 0 1em rgba(255,255,255,0.75);
  255. box-shadow: 0 0 1em rgba(255,255,255,0.75);
  256. }
  257.  
  258. .switch-led-glow:after {
  259. content: '';
  260. display: block;
  261. width: 0;
  262. height: 0;
  263. position: absolute;
  264. top: 0;
  265. left: 0;
  266. opacity: 0.2;
  267. filter: alpha(opacity=20);
  268. border: 1em solid #fff;
  269. border-color: transparent #fff transparent #fff;
  270. border-radius: 1em;
  271. -webkit-transform: rotate(45deg);
  272. -moz-transform: rotate(45deg);
  273. -ms-transform: rotate(45deg);
  274. -o-transform: rotate(45deg);
  275. transform: rotate(45deg);
  276. }
  277.  
  278. .switch-led:after {
  279. display: block;
  280. width: 100%;
  281. position: absolute;
  282. left: 0;
  283. color: #666;
  284. font-family: arial, verdana, sans-serif;
  285. font-weight: bold;
  286. text-align: center;
  287. text-shadow: 0 0.1em rgba(0,0,0,0.7);
  288. }
  289.  
  290. .switch-led-green:after {
  291. content: 'ON';
  292. top: -1.8em;
  293. }
  294.  
  295. .switch-led-red:after {
  296. content: 'OFF';
  297. bottom: -1.8em;
  298. }
  299.  
  300. .switch-led-green {
  301. top: -5em;
  302. border-top: 0.1em solid rgba(0,161,75,0.5);
  303. border-bottom: 0.1em solid rgba(255,255,255,0.25);
  304. }
  305.  
  306. .switch-led-green .switch-led-light {
  307. background: rgb(0,161,75);
  308. border: 0.1em solid rgb(0,104,56);
  309. }
  310.  
  311. .switch-led-red {
  312. bottom: -5em;
  313. border-top: 0.1em solid rgba(237,28,36,0.2);
  314. border-bottom: 0.1em solid rgba(255,255,255,0.25);
  315. -webkit-box-shadow: 0 0 3em rgb(237,28,36);
  316. -moz-box-shadow: 0 0 3em rgb(237,28,36);
  317. box-shadow: 0 0 3em rgb(237,28,36);
  318. }
  319.  
  320. .switch-led-red .switch-led-light {
  321. background: rgb(237,28,36);
  322. border: 0.1em solid rgb(161,30,45);
  323. }
  324.  
  325. .switch-led-red .switch-led-glow {
  326. background: #fff;
  327. background: rgba(255, 255, 255, 0.3);
  328. filter: alpha(opacity=30);
  329. }
  330.  
  331. /* Switch on */
  332.  
  333. .switch input:checked~.switch-handle-left, .switch input:checked~.switch-handle-right {
  334. top: 1.5em;
  335. border-bottom: 0;
  336. border-top: 4.5em solid #111;
  337. }
  338.  
  339. .switch input:checked~.switch-handle {
  340. top: 1.5em;
  341. }
  342.  
  343. .switch input:checked~.switch-handle-top {
  344. top: -1em;
  345. border-top: 0;
  346. border-bottom: 0.2em solid #AEB2B3;
  347. }
  348.  
  349. .switch input:checked~.switch-handle-bottom {
  350. top: 4.2em;
  351. border-top: 0;
  352. border-bottom: 0.2em solid #141414;
  353. }
  354.  
  355. .switch input:checked~.switch-handle-base {
  356. top: 4.5em;
  357. border-top: 0;
  358. border-bottom: 0.2em solid rgba(255,255,255,0.35);
  359. }
  360.  
  361. .switch input:checked~.switch-led-green {
  362. -webkit-box-shadow: 0 0 3em rgb(0,161,75);
  363. -moz-box-shadow: 0 0 3em rgb(0,161,75);
  364. box-shadow: 0 0 3em rgb(0,161,75);
  365. }
  366.  
  367. .switch input:checked~.switch-led-green .switch-led-glow {
  368. background: #fff;
  369. background: rgba(255, 255, 255, 0.4);
  370. filter: alpha(opacity=40);
  371. }
  372.  
  373. .switch input:checked~.switch-led-red {
  374. -webkit-box-shadow: none;
  375. -moz-box-shadow: none;
  376. box-shadow: none;
  377. }
  378.  
  379. .switch input:checked~.switch-led-red .switch-led-glow {
  380. background: rgba(255, 255, 255, 0);
  381. filter: alpha(opacity=0);
  382. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement