style.css 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151
  1. @import url('normalize.css');
  2. @import url('demo.css');
  3. /* GLOBALS */
  4. *,
  5. *:after,
  6. *:before {
  7. -webkit-box-sizing: border-box;
  8. -moz-box-sizing: border-box;
  9. box-sizing: border-box;
  10. padding: 0;
  11. margin: 0;
  12. }
  13. .switch {
  14. margin: 5px 20px;
  15. position: relative;
  16. float:left;
  17. }
  18. .switch label {
  19. width: 100%;
  20. height: 100%;
  21. position: relative;
  22. display: block;
  23. }
  24. .switch input {
  25. top: 0;
  26. right: 0;
  27. bottom: 0;
  28. left: 0;
  29. opacity: 0;
  30. z-index: 100;
  31. position: absolute;
  32. width: 100%;
  33. height: 100%;
  34. cursor: pointer;
  35. }
  36. /* DEMO 1 */
  37. .switch.demo1 {
  38. width: 100px;
  39. height: 100px;
  40. }
  41. .switch.demo1 label {
  42. border-radius: 50%;
  43. background: #eaeaea;
  44. /* box-shadow:
  45. 0 3px 5px rgba(0,0,0,0.25),
  46. inset 0 1px 0 rgba(255,255,255,0.3),
  47. inset 0 -5px 5px rgba(100,100,100,0.1),
  48. inset 0 5px 5px rgba(255,255,255,0.3);*/
  49. }
  50. .switch.demo1 label:after {
  51. content: "";
  52. position: absolute;
  53. top: -8%; right: -8%; bottom: -8%; left: -8%;
  54. z-index: -1;
  55. border-radius: inherit;
  56. background: #ddd;
  57. /*background: -moz-linear-gradient(#ccc, #fff);
  58. background: -ms-linear-gradient(#ccc, #fff);
  59. background: -o-linear-gradient(#ccc, #fff);
  60. background: -webkit-gradient(linear, 0 0, 0 100%, from(#ccc), to(#fff));
  61. background: -webkit-linear-gradient(#ccc, #fff);
  62. background: linear-gradient(#ccc, #fff);
  63. box-shadow:
  64. inset 0 2px 1px rgba(0,0,0,0.15),
  65. 0 2px 5px rgba(200,200,200,0.1);*/
  66. }
  67. .switch.demo1 label:before {
  68. content: "";
  69. position: absolute;
  70. width: 20%;
  71. height: 20%;
  72. border-radius: inherit;
  73. left: 40%;
  74. top: 40%;
  75. background: #969696;
  76. background: radial-gradient(40% 35%, #ccc, #969696 60%);
  77. box-shadow:
  78. inset 0 2px 4px 1px rgba(0,0,0,0.3),
  79. 0 1px 0 rgba(255,255,255,1),
  80. inset 0 1px 0 white;
  81. }
  82. .switch.demo1 input:checked ~ label {
  83. background: #dedede;
  84. background: -moz-linear-gradient(#dedede, #fdfdfd);
  85. background: -ms-linear-gradient(#dedede, #fdfdfd);
  86. background: -o-linear-gradient(#dedede, #fdfdfd);
  87. background: -webkit-gradient(linear, 0 0, 0 100%, from(#dedede), to(#fdfdfd));
  88. background: -webkit-linear-gradient(#dedede, #fdfdfd);
  89. background: linear-gradient(#dedede, #fdfdfd);
  90. }
  91. .switch.demo1 input:checked ~ label:before {
  92. background: #25d025;
  93. background: radial-gradient(40% 35%, #5aef5a, #25d025 60%);
  94. box-shadow:
  95. inset 0 3px 5px 1px rgba(0,0,0,0.1),
  96. 0 1px 0 rgba(255,255,255,0.4),
  97. 0 0 10px 2px rgba(0, 210, 0, 0.5);
  98. }
  99. /* DEMO 1_s */
  100. .switch.demo1_s {
  101. width: 20px;
  102. height: 20px;
  103. }
  104. .switch.demo1_s label {
  105. border-radius: 50%;
  106. background: #fff;
  107. border:#ddd 1px solid;
  108. /* box-shadow:
  109. 0 3px 5px rgba(0,0,0,0.25),
  110. inset 0 1px 0 rgba(255,255,255,0.3),
  111. inset 0 -5px 5px rgba(100,100,100,0.1),
  112. inset 0 5px 5px rgba(255,255,255,0.3);*/
  113. }
  114. .switch.demo1_s label:after {
  115. content: "";
  116. position: absolute;
  117. top: -3%; right: -3%; bottom: -3%; left: -3%;
  118. z-index: -1;
  119. border-radius: inherit;
  120. background: #ddd;
  121. /* background: -moz-linear-gradient(#ccc, #fff);
  122. background: -ms-linear-gradient(#ccc, #fff);
  123. background: -o-linear-gradient(#ccc, #fff);
  124. background: -webkit-gradient(linear, 0 0, 0 100%, from(#ccc), to(#fff));
  125. background: -webkit-linear-gradient(#ccc, #fff);
  126. background: linear-gradient(#ccc, #fff);
  127. box-shadow:
  128. inset 0 2px 1px rgba(0,0,0,0.15),
  129. 0 2px 5px rgba(200,200,200,0.1);*/
  130. }
  131. .switch.demo1_s label:before {
  132. content: "";
  133. position: absolute;
  134. width: 35%;
  135. height: 35%;
  136. border-radius: inherit;
  137. left: 32.5%;
  138. top: 32.5%;
  139. background: #969696;
  140. /* background: radial-gradient(40% 35%, #ccc, #969696 60%);
  141. box-shadow:
  142. inset 0 2px 4px 1px rgba(0,0,0,0.3),
  143. 0 1px 0 rgba(255,255,255,1),
  144. inset 0 1px 0 white;*/
  145. }
  146. .switch.demo1_s input:checked ~ label {
  147. background: #fffdfd;
  148. /* background: -moz-linear-gradient(#dedede, #fdfdfd);
  149. background: -ms-linear-gradient(#dedede, #fdfdfd);
  150. background: -o-linear-gradient(#dedede, #fdfdfd);
  151. background: -webkit-gradient(linear, 0 0, 0 100%, from(#dedede), to(#fdfdfd));
  152. background: -webkit-linear-gradient(#dedede, #fdfdfd);
  153. background: linear-gradient(#dedede, #fdfdfd);*/
  154. }
  155. .switch.demo1_s input:checked ~ label:before {
  156. background: #25d025;
  157. /* background: radial-gradient(40% 35%, #5aef5a, #25d025 60%);
  158. box-shadow:
  159. inset 0 3px 5px 1px rgba(0,0,0,0.1),
  160. 0 1px 0 rgba(255,255,255,0.4),
  161. 0 0 10px 2px rgba(0, 210, 0, 0.5);*/
  162. }
  163. /* DEMO 1_m */
  164. .switch.demo1_m {
  165. width: 15px;
  166. height: 15px;
  167. }
  168. .switch.demo1_m label {
  169. border-radius: 50%;
  170. background: #fff;
  171. /*box-shadow:
  172. 0 3px 5px rgba(0,0,0,0.25),
  173. inset 0 1px 0 rgba(255,255,255,0.3),
  174. inset 0 -5px 5px rgba(100,100,100,0.1),
  175. inset 0 5px 5px rgba(255,255,255,0.3);*/
  176. }
  177. .switch.demo1_m label:after {
  178. content: "";
  179. position: absolute;
  180. top: -8%; right: -8%; bottom: -8%; left: -8%;
  181. z-index: 1;
  182. border-radius: inherit;
  183. background: #fafafa;
  184. border:#ddd 1px solid;
  185. /* background: -moz-linear-gradient(#ccc, #fff);
  186. background: -ms-linear-gradient(#ccc, #fff);
  187. background: -o-linear-gradient(#ccc, #fff);
  188. background: -webkit-gradient(linear, 0 0, 0 100%, from(#ccc), to(#fff));
  189. background: -webkit-linear-gradient(#ccc, #fff);
  190. background: linear-gradient(#ccc, #fff);
  191. box-shadow:
  192. inset 0 2px 1px rgba(0,0,0,0.15),
  193. 0 2px 5px rgba(200,200,200,0.1);*/
  194. }
  195. .switch.demo1_m label:before {
  196. content: "";
  197. position: absolute;
  198. width: 40%;
  199. height: 40%;
  200. border-radius: inherit;
  201. left: 30%;
  202. top: 30%;
  203. background: #1db9ff;
  204. z-index:20;
  205. /* background: radial-gradient(40% 35%, #ccc, #969696 60%);
  206. box-shadow:
  207. inset 0 2px 4px 1px rgba(0,0,0,0.3),
  208. 0 1px 0 rgba(255,255,255,1),
  209. inset 0 1px 0 white;*/
  210. }
  211. .switch.demo1_m input:checked ~ label {
  212. background: #dedede;
  213. background: -moz-linear-gradient(#dedede, #fdfdfd);
  214. background: -ms-linear-gradient(#dedede, #fdfdfd);
  215. background: -o-linear-gradient(#dedede, #fdfdfd);
  216. background: -webkit-gradient(linear, 0 0, 0 100%, from(#dedede), to(#fdfdfd));
  217. background: -webkit-linear-gradient(#dedede, #fdfdfd);
  218. background: linear-gradient(#dedede, #fdfdfd);
  219. }
  220. .switch.demo1_m input:checked ~ label:before {
  221. background: #25d025;
  222. background: radial-gradient(40% 35%, #5aef5a, #25d025 60%);
  223. box-shadow:
  224. inset 0 3px 5px 1px rgba(0,0,0,0.1),
  225. 0 1px 0 rgba(255,255,255,0.4),
  226. 0 0 10px 2px rgba(0, 210, 0, 0.5);
  227. }
  228. /* DEMO 2 */
  229. .switch.demo2 {
  230. width: 50px;
  231. height: 100px;
  232. }
  233. .switch.demo2 label {
  234. background: #cbc7bc;
  235. margin: 0 auto;
  236. border-radius: 5px;
  237. box-shadow:
  238. inset 0 1px 0 white,
  239. 0 0 0 1px #999,
  240. 0 0 5px 1px rgba(0,0,0,0.2),
  241. 0 2px 0 rgba(255,255,255,0.6),
  242. inset 0 10px 1px #e5e5e5,
  243. inset 0 11px 0 rgba(255,255,255,0.5),
  244. inset 0 -45px 3px #ddd;
  245. }
  246. .switch.demo2 label:after {
  247. content: "";
  248. position: absolute;
  249. top: -20px;
  250. left: -25px;
  251. bottom: -20px;
  252. right: -25px;
  253. background: #ccc;
  254. background: -moz-linear-gradient(#ddd, #bbb);
  255. background: -ms-linear-gradient(#ddd, #bbb);
  256. background: -o-linear-gradient(#ddd, #bbb);
  257. background: -webkit-gradient(linear, 0 0, 0 100%, from(#ddd), to(#bbb));
  258. background: -webkit-linear-gradient(#ddd, #bbb);
  259. background: linear-gradient(#ddd, #bbb);
  260. z-index: -1;
  261. border-radius: 5px;
  262. border: 1px solid #bbb;
  263. box-shadow:
  264. 0 0 5px 1px rgba(0,0,0,0.15),
  265. 0 3px 3px rgba(0,0,0,0.3),
  266. inset 0 1px 0 rgba(255,255,255,0.5);
  267. }
  268. .switch.demo2 label:before {
  269. content: "";
  270. position: absolute;
  271. width: 8px;
  272. height: 8px;
  273. background: #666;
  274. top: -13px;
  275. left: 20px;
  276. border-radius: 50%;
  277. box-shadow:
  278. 0 120px 0 #666,
  279. 0 1px 0 white,
  280. 0 121px 0 white;
  281. }
  282. .switch.demo2 input:checked ~ label {
  283. background: #d2cbc3;
  284. box-shadow:
  285. inset 0 1px 0 white,
  286. 0 0 0 1px #999,
  287. 0 0 5px 1px rgba(0,0,0,0.2),
  288. inset 0 -10px 0 #aaa,
  289. 0 2px 0 rgba(255,255,255,0.1),
  290. inset 0 45px 3px #e0e0E0,
  291. 0 8px 6px rgba(0,0,0,0.18);
  292. }
  293. /* DEMO 2_s */
  294. .switch.demo2_s {
  295. width: 15px;
  296. height: 30px;
  297. }
  298. .switch.demo2_s label {
  299. background: #cbc7bc;
  300. margin: 0 auto;
  301. border-radius: 5px;
  302. box-shadow:
  303. inset 0 1px 0 white,
  304. 0 0 0 1px #999,
  305. 0 0 5px 1px rgba(0,0,0,0.2),
  306. 0 2px 0 rgba(255,255,255,0.6),
  307. inset 0 10px 1px #e5e5e5,
  308. inset 0 11px 0 rgba(255,255,255,0.5),
  309. inset 0 -45px 3px #ddd;
  310. }
  311. .switch.demo2_s label:after {
  312. content: "";
  313. position: absolute;
  314. top: -20px;
  315. left: -25px;
  316. bottom: -20px;
  317. right: -25px;
  318. background: #ccc;
  319. background: -moz-linear-gradient(#ddd, #bbb);
  320. background: -ms-linear-gradient(#ddd, #bbb);
  321. background: -o-linear-gradient(#ddd, #bbb);
  322. background: -webkit-gradient(linear, 0 0, 0 100%, from(#ddd), to(#bbb));
  323. background: -webkit-linear-gradient(#ddd, #bbb);
  324. background: linear-gradient(#ddd, #bbb);
  325. z-index: -1;
  326. border-radius: 5px;
  327. border: 1px solid #bbb;
  328. box-shadow:
  329. 0 0 5px 1px rgba(0,0,0,0.15),
  330. 0 3px 3px rgba(0,0,0,0.3),
  331. inset 0 1px 0 rgba(255,255,255,0.5);
  332. }
  333. .switch.demo2_s label:before {
  334. content: "";
  335. position: absolute;
  336. width: 4px;
  337. height: 4px;
  338. background: #666;
  339. top: -10px;
  340. left: 5px;
  341. border-radius: 50%;
  342. box-shadow:
  343. 0 46px 0 #666,
  344. 0 1px 0 white,
  345. 0 47px 0 white;
  346. }
  347. .switch.demo2_s input:checked ~ label {
  348. background: #d2cbc3;
  349. box-shadow:
  350. inset 0 1px 0 white,
  351. 0 0 0 1px #999,
  352. 0 0 5px 1px rgba(0,0,0,0.2),
  353. inset 0 -10px 0 #aaa,
  354. 0 2px 0 rgba(255,255,255,0.1),
  355. inset 0 45px 3px #e0e0E0,
  356. 0 8px 6px rgba(0,0,0,0.18);
  357. }
  358. /* DEMO 2_m */
  359. .switch.demo2_m {
  360. width: 30px;
  361. height: 60px;
  362. }
  363. .switch.demo2_m label {
  364. background: #cbc7bc;
  365. margin: 0 auto;
  366. border-radius: 5px;
  367. box-shadow:
  368. inset 0 1px 0 white,
  369. 0 0 0 1px #999,
  370. 0 0 5px 1px rgba(0,0,0,0.2),
  371. 0 2px 0 rgba(255,255,255,0.6),
  372. inset 0 10px 1px #e5e5e5,
  373. inset 0 11px 0 rgba(255,255,255,0.5),
  374. inset 0 -45px 3px #ddd;
  375. }
  376. .switch.demo2_m label:after {
  377. content: "";
  378. position: absolute;
  379. top: -20px;
  380. left: -25px;
  381. bottom: -20px;
  382. right: -25px;
  383. background: #ccc;
  384. background: -moz-linear-gradient(#ddd, #bbb);
  385. background: -ms-linear-gradient(#ddd, #bbb);
  386. background: -o-linear-gradient(#ddd, #bbb);
  387. background: -webkit-gradient(linear, 0 0, 0 100%, from(#ddd), to(#bbb));
  388. background: -webkit-linear-gradient(#ddd, #bbb);
  389. background: linear-gradient(#ddd, #bbb);
  390. z-index: -1;
  391. border-radius: 5px;
  392. border: 1px solid #bbb;
  393. box-shadow:
  394. 0 0 5px 1px rgba(0,0,0,0.15),
  395. 0 3px 3px rgba(0,0,0,0.3),
  396. inset 0 1px 0 rgba(255,255,255,0.5);
  397. }
  398. .switch.demo2_m label:before {
  399. content: "";
  400. position: absolute;
  401. width: 6px;
  402. height: 6px;
  403. background: #666;
  404. top: -13px;
  405. left: 10px;
  406. border-radius: 50%;
  407. box-shadow:
  408. 0 80px 0 #666,
  409. 0 1px 0 white,
  410. 0 81px 0 white;
  411. }
  412. .switch.demo2_m input:checked ~ label {
  413. background: #d2cbc3;
  414. box-shadow:
  415. inset 0 1px 0 white,
  416. 0 0 0 1px #999,
  417. 0 0 5px 1px rgba(0,0,0,0.2),
  418. inset 0 -10px 0 #aaa,
  419. 0 2px 0 rgba(255,255,255,0.1),
  420. inset 0 45px 3px #e0e0E0,
  421. 0 8px 6px rgba(0,0,0,0.18);
  422. }
  423. /* DEMO 3 */
  424. .switch.demo3 {
  425. width: 180px;
  426. height: 50px;
  427. }
  428. .switch.demo3 label {
  429. display: block;
  430. width: 100%;
  431. height: 100%;
  432. background: #a5a39d;
  433. border-radius: 40px;
  434. box-shadow:
  435. inset 0 3px 8px 1px rgba(0,0,0,0.2),
  436. 0 1px 0 rgba(255,255,255,0.5);
  437. }
  438. .switch.demo3 label:after {
  439. content: "";
  440. position: absolute;
  441. z-index: -1;
  442. top: -8px; right: -8px; bottom: -8px; left: -8px;
  443. border-radius: inherit;
  444. background: #ababab;
  445. background: -moz-linear-gradient(#f2f2f2, #ababab);
  446. background: -ms-linear-gradient(#f2f2f2, #ababab);
  447. background: -o-linear-gradient(#f2f2f2, #ababab);
  448. background: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#ababab));
  449. background: -webkit-linear-gradient(#f2f2f2, #ababab);
  450. background: linear-gradient(#f2f2f2, #ababab);
  451. box-shadow: 0 0 10px rgba(0,0,0,0.3),
  452. 0 1px 1px rgba(0,0,0,0.25);
  453. }
  454. .switch.demo3 label:before {
  455. content: "";
  456. position: absolute;
  457. z-index: -1;
  458. top: -18px; right: -18px; bottom: -18px; left: -18px;
  459. border-radius: inherit;
  460. background: #eee;
  461. background: -moz-linear-gradient(#e5e7e6, #eee);
  462. background: -ms-linear-gradient(#e5e7e6, #eee);
  463. background: -o-linear-gradient(#e5e7e6, #eee);
  464. background: -webkit-gradient(linear, 0 0, 0 100%, from(#e5e7e6), to(#eee));
  465. background: -webkit-linear-gradient(#e5e7e6, #eee);
  466. background: linear-gradient(#e5e7e6, #eee);
  467. box-shadow:
  468. 0 1px 0 rgba(255,255,255,0.5);
  469. -webkit-filter: blur(1px);
  470. -moz-filter: blur(1px);
  471. -ms-filter: blur(1px);
  472. -o-filter: blur(1px);
  473. filter: blur(1px);
  474. }
  475. .switch.demo3 label i {
  476. display: block;
  477. height: 100%;
  478. width: 60%;
  479. border-radius: inherit;
  480. background: silver;
  481. position: absolute;
  482. z-index: 2;
  483. right: 40%;
  484. top: 0;
  485. background: #b2ac9e;
  486. background: -moz-linear-gradient(#f7f2f6, #b2ac9e);
  487. background: -ms-linear-gradient(#f7f2f6, #b2ac9e);
  488. background: -o-linear-gradient(#f7f2f6, #b2ac9e);
  489. background: -webkit-gradient(linear, 0 0, 0 100%, from(#f7f2f6), to(#b2ac9e));
  490. background: -webkit-linear-gradient(#f7f2f6, #b2ac9e);
  491. background: linear-gradient(#f7f2f6, #b2ac9e);
  492. box-shadow:
  493. inset 0 1px 0 white,
  494. 0 0 8px rgba(0,0,0,0.3),
  495. 0 5px 5px rgba(0,0,0,0.2);
  496. }
  497. .switch.demo3 label i:after {
  498. content: "";
  499. position: absolute;
  500. left: 15%;
  501. top: 25%;
  502. width: 70%;
  503. height: 50%;
  504. background: #d2cbc3;
  505. background: -moz-linear-gradient(#cbc7bc, #d2cbc3);
  506. background: -ms-linear-gradient(#cbc7bc, #d2cbc3);
  507. background: -o-linear-gradient(#cbc7bc, #d2cbc3);
  508. background: -webkit-gradient(linear, 0 0, 0 100%, from(#cbc7bc), to(#d2cbc3));
  509. background: -webkit-linear-gradient(#cbc7bc, #d2cbc3);
  510. background: linear-gradient(#cbc7bc, #d2cbc3);
  511. border-radius: inherit;
  512. }
  513. .switch.demo3 label i:before {
  514. content: "off";
  515. text-transform: uppercase;
  516. font-style: normal;
  517. font-weight: bold;
  518. color: rgba(0,0,0,0.4);
  519. text-shadow: 0 1px 0 #bcb8ae, 0 -1px 0 #97958e;
  520. font-family: Helvetica, Arial, sans-serif;
  521. font-size: 24px;
  522. position: absolute;
  523. top: 50%;
  524. margin-top: -12px;
  525. right: -50%;
  526. }
  527. .switch.demo3 input:checked ~ label {
  528. background: #9abb82;
  529. }
  530. .switch.demo3 input:checked ~ label i {
  531. right: -1%;
  532. }
  533. .switch.demo3 input:checked ~ label i:before {
  534. content: "on";
  535. right: 115%;
  536. color: #82a06a;
  537. text-shadow:
  538. 0 1px 0 #afcb9b,
  539. 0 -1px 0 #6b8659;
  540. }
  541. /* DEMO 3_s */
  542. .switch.demo3_s {
  543. width: 65px;
  544. height: 16px;
  545. }
  546. .switch.demo3_s label {
  547. display: block;
  548. width: 100%;
  549. height: 100%;
  550. /*background: #a5a39d;*/
  551. border-radius: 40px;
  552. /* box-shadow:
  553. inset 0 3px 8px 1px rgba(0,0,0,0.2),
  554. 0 1px 0 rgba(255,255,255,0.5);*/
  555. }
  556. .switch.demo3_s label:after {
  557. content: "";
  558. position: absolute;
  559. z-index: -1;
  560. top: -1px; right: -1px; bottom: -1px; left: -1px;
  561. border-radius: inherit;
  562. background: #cac8c8;
  563. /* background: -moz-linear-gradient(#f2f2f2, #ababab);
  564. background: -ms-linear-gradient(#f2f2f2, #ababab);
  565. background: -o-linear-gradient(#f2f2f2, #ababab);
  566. background: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#ababab));
  567. background: -webkit-linear-gradient(#f2f2f2, #ababab);
  568. background: linear-gradient(#f2f2f2, #ababab);
  569. box-shadow: 0 0 10px rgba(0,0,0,0.3),
  570. 0 1px 1px rgba(0,0,0,0.25);*/
  571. }
  572. .switch.demo3_s label:before {
  573. content: "";
  574. position: absolute;
  575. z-index: -1;
  576. top: -1px; right: -1px; bottom: -1px; left: -1px;
  577. border-radius: inherit;
  578. /* background: #cac8c8;
  579. background: -moz-linear-gradient(#e5e7e6, #eee);
  580. background: -ms-linear-gradient(#e5e7e6, #eee);
  581. background: -o-linear-gradient(#e5e7e6, #eee);
  582. background: -webkit-gradient(linear, 0 0, 0 100%, from(#e5e7e6), to(#eee));
  583. background: -webkit-linear-gradient(#e5e7e6, #eee);
  584. background: linear-gradient(#e5e7e6, #eee);
  585. box-shadow:
  586. 0 1px 0 rgba(255,255,255,0.5);*/
  587. -webkit-filter: blur(1px);
  588. -moz-filter: blur(1px);
  589. -ms-filter: blur(1px);
  590. -o-filter: blur(1px);
  591. filter: blur(1px);
  592. }
  593. .switch.demo3_s label i {
  594. display: block;
  595. height: 100%;
  596. width: 50%;
  597. border-radius: inherit;
  598. /*background: silver;*/
  599. position: absolute;
  600. z-index: 2;
  601. right: 50%;
  602. top: 0;
  603. background: #fff;
  604. /* background: #b2ac9e;
  605. background: -moz-linear-gradient(#f7f2f6, #b2ac9e);
  606. background: -ms-linear-gradient(#f7f2f6, #b2ac9e);
  607. background: -o-linear-gradient(#f7f2f6, #b2ac9e);
  608. background: -webkit-gradient(linear, 0 0, 0 100%, from(#f7f2f6), to(#b2ac9e));
  609. background: -webkit-linear-gradient(#f7f2f6, #b2ac9e);
  610. background: linear-gradient(#f7f2f6, #b2ac9e);
  611. box-shadow:
  612. inset 0 1px 0 white,
  613. 0 0 8px rgba(0,0,0,0.3),
  614. 0 5px 5px rgba(0,0,0,0.2);*/
  615. }
  616. .switch.demo3_s label i:after {
  617. content: "";
  618. position: absolute;
  619. left: 15%;
  620. top: 25%;
  621. width: 70%;
  622. height: 50%;
  623. /* background: #d2cbc3;
  624. background: -moz-linear-gradient(#cbc7bc, #d2cbc3);
  625. background: -ms-linear-gradient(#cbc7bc, #d2cbc3);
  626. background: -o-linear-gradient(#cbc7bc, #d2cbc3);
  627. background: -webkit-gradient(linear, 0 0, 0 100%, from(#cbc7bc), to(#d2cbc3));
  628. background: -webkit-linear-gradient(#cbc7bc, #d2cbc3);
  629. background: linear-gradient(#cbc7bc, #d2cbc3);*/
  630. border-radius: inherit;
  631. }
  632. .switch.demo3_s label i:before {
  633. content: "";
  634. text-transform: uppercase;
  635. font-style: normal;
  636. font-weight: bold;
  637. color: rgba(0,0,0,0.4);
  638. text-shadow: 0 1px 0 #bcb8ae, 0 -1px 0 #97958e;
  639. font-family: Helvetica, Arial, sans-serif;
  640. font-size: 12px;
  641. position: absolute;
  642. top: 50%;
  643. margin-top: -8px;
  644. right: -58%;
  645. }
  646. .switch.demo3_s input:checked ~ label {
  647. background: #3dad61;
  648. }
  649. .switch.demo3_s input:checked ~ label i {
  650. right: -1%;
  651. }
  652. .switch.demo3_s input:checked ~ label i:before {
  653. content: "";
  654. right: 110%;
  655. color: #82a06a;
  656. /*text-shadow:
  657. 0 1px 0 #afcb9b,
  658. 0 -1px 0 #6b8659;*/
  659. }
  660. /* DEMO 3_m */
  661. .switch.demo3_m {
  662. width: 110px;
  663. height: 30px;
  664. }
  665. .switch.demo3_m label {
  666. display: block;
  667. width: 100%;
  668. height: 100%;
  669. background: #a5a39d;
  670. border-radius: 40px;
  671. box-shadow:
  672. inset 0 3px 8px 1px rgba(0,0,0,0.2),
  673. 0 1px 0 rgba(255,255,255,0.5);
  674. }
  675. .switch.demo3_m label:after {
  676. content: "";
  677. position: absolute;
  678. z-index: -1;
  679. top: -8px; right: -8px; bottom: -8px; left: -8px;
  680. border-radius: inherit;
  681. background: #ababab;
  682. background: -moz-linear-gradient(#f2f2f2, #ababab);
  683. background: -ms-linear-gradient(#f2f2f2, #ababab);
  684. background: -o-linear-gradient(#f2f2f2, #ababab);
  685. background: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#ababab));
  686. background: -webkit-linear-gradient(#f2f2f2, #ababab);
  687. background: linear-gradient(#f2f2f2, #ababab);
  688. box-shadow: 0 0 10px rgba(0,0,0,0.3),
  689. 0 1px 1px rgba(0,0,0,0.25);
  690. }
  691. .switch.demo3_m label:before {
  692. content: "";
  693. position: absolute;
  694. z-index: -1;
  695. top: -18px; right: -18px; bottom: -18px; left: -18px;
  696. border-radius: inherit;
  697. background: #eee;
  698. background: -moz-linear-gradient(#e5e7e6, #eee);
  699. background: -ms-linear-gradient(#e5e7e6, #eee);
  700. background: -o-linear-gradient(#e5e7e6, #eee);
  701. background: -webkit-gradient(linear, 0 0, 0 100%, from(#e5e7e6), to(#eee));
  702. background: -webkit-linear-gradient(#e5e7e6, #eee);
  703. background: linear-gradient(#e5e7e6, #eee);
  704. box-shadow:
  705. 0 1px 0 rgba(255,255,255,0.5);
  706. -webkit-filter: blur(1px);
  707. -moz-filter: blur(1px);
  708. -ms-filter: blur(1px);
  709. -o-filter: blur(1px);
  710. filter: blur(1px);
  711. }
  712. .switch.demo3_m label i {
  713. display: block;
  714. height: 100%;
  715. width: 60%;
  716. border-radius: inherit;
  717. background: silver;
  718. position: absolute;
  719. z-index: 2;
  720. right: 40%;
  721. top: 0;
  722. background: #b2ac9e;
  723. background: -moz-linear-gradient(#f7f2f6, #b2ac9e);
  724. background: -ms-linear-gradient(#f7f2f6, #b2ac9e);
  725. background: -o-linear-gradient(#f7f2f6, #b2ac9e);
  726. background: -webkit-gradient(linear, 0 0, 0 100%, from(#f7f2f6), to(#b2ac9e));
  727. background: -webkit-linear-gradient(#f7f2f6, #b2ac9e);
  728. background: linear-gradient(#f7f2f6, #b2ac9e);
  729. box-shadow:
  730. inset 0 1px 0 white,
  731. 0 0 8px rgba(0,0,0,0.3),
  732. 0 5px 5px rgba(0,0,0,0.2);
  733. }
  734. .switch.demo3_m label i:after {
  735. content: "";
  736. position: absolute;
  737. left: 15%;
  738. top: 25%;
  739. width: 70%;
  740. height: 50%;
  741. background: #d2cbc3;
  742. background: -moz-linear-gradient(#cbc7bc, #d2cbc3);
  743. background: -ms-linear-gradient(#cbc7bc, #d2cbc3);
  744. background: -o-linear-gradient(#cbc7bc, #d2cbc3);
  745. background: -webkit-gradient(linear, 0 0, 0 100%, from(#cbc7bc), to(#d2cbc3));
  746. background: -webkit-linear-gradient(#cbc7bc, #d2cbc3);
  747. background: linear-gradient(#cbc7bc, #d2cbc3);
  748. border-radius: inherit;
  749. }
  750. .switch.demo3_m label i:before {
  751. content: "off";
  752. text-transform: uppercase;
  753. font-style: normal;
  754. font-weight: bold;
  755. color: rgba(0,0,0,0.4);
  756. text-shadow: 0 1px 0 #bcb8ae, 0 -1px 0 #97958e;
  757. font-family: Helvetica, Arial, sans-serif;
  758. font-size: 18px;
  759. position: absolute;
  760. top: 50%;
  761. margin-top: -10px;
  762. right: -60%;
  763. }
  764. .switch.demo3_m input:checked ~ label {
  765. background: #9abb82;
  766. }
  767. .switch.demo3_m input:checked ~ label i {
  768. right: -1%;
  769. }
  770. .switch.demo3_m input:checked ~ label i:before {
  771. content: "on";
  772. right: 110%;
  773. color: #82a06a;
  774. text-shadow:
  775. 0 1px 0 #afcb9b,
  776. 0 -1px 0 #6b8659;
  777. }
  778. /* DEMO 4 */
  779. .switch.demo4 {
  780. width: 150px;
  781. height: 150px;
  782. }
  783. .switch.demo4 label {
  784. border-radius: 50%;
  785. background: #b2ac9e;
  786. background: -moz-linear-gradient(#f7f2f6, #b2ac9e);
  787. background: -ms-linear-gradient(#f7f2f6, #b2ac9e);
  788. background: -o-linear-gradient(#f7f2f6, #b2ac9e);
  789. background: -webkit-gradient(linear, 0 0, 0 100%, from(#f7f2f6), to(#b2ac9e));
  790. background: -webkit-linear-gradient(#f7f2f6, #b2ac9e);
  791. background: linear-gradient(#f7f2f6, #b2ac9e);
  792. position: relative;
  793. color: #a5a39d;
  794. font-size: 100px;
  795. text-align: center;
  796. line-height: 150px;
  797. -webkit-transition: all 0.3s ease-out;
  798. -moz-transition: all 0.3s ease-out;
  799. -ms-transition: all 0.3s ease-out;
  800. -o-transition: all 0.3s ease-out;
  801. transition: all 0.3s ease-out;
  802. text-shadow: 0 2px 1px rgba(0,0,0,0.25);
  803. box-shadow:
  804. inset 0 2px 3px rgba(255,255,255,0.13),
  805. 0 5px 8px rgba(0,0,0,0.3),
  806. 0 10px 10px 4px rgba(0,0,0,0.3);
  807. z-index: -1;
  808. }
  809. .switch.demo4 label:after {
  810. content: "";
  811. position: absolute;
  812. left: -20px;
  813. right: -20px;
  814. top: -20px;
  815. bottom: -20px;
  816. z-index: -2;
  817. border-radius: inherit;
  818. box-shadow:
  819. inset 0 1px 0 rgba(255,255,255,0.1),
  820. 0 1px 2px rgba(0,0,0,0.3),
  821. 0 0 10px rgba(0,0,0,0.15);
  822. }
  823. .switch.demo4 label:before {
  824. content: "";
  825. position: absolute;
  826. left: -10px;
  827. right: -10px;
  828. top: -10px;
  829. bottom: -10px;
  830. z-index: -1;
  831. border-radius: inherit;
  832. box-shadow: inset 0 10px 10px rgba(0,0,0,0.13);
  833. -webkit-filter:blur(1px);
  834. -moz-filter:blur(1px);
  835. -ms-filter:blur(1px);
  836. -o-filter:blur(1px);
  837. filter: blur(1px);
  838. }
  839. .switch.demo4 input:checked ~ label {
  840. box-shadow:
  841. inset 0 2px 3px rgba(255,255,255,0.13),
  842. 0 5px 8px rgba(0,0,0,0.35),
  843. 0 3px 10px 4px rgba(0,0,0,0.2);
  844. color: #9abb82;
  845. }
  846. .switch.demo4 .icon-off:after {
  847. content: "";
  848. display: block;
  849. position: absolute;
  850. width: 70%;
  851. height: 70%;
  852. left: 50%;
  853. top: 50%;
  854. z-index: -1;
  855. margin: -35% 0 0 -35%;
  856. border-radius: 50%;
  857. background: #d2cbc3;
  858. background: -moz-linear-gradient(#cbc7bc, #d2cbc3);
  859. background: -ms-linear-gradient(#cbc7bc, #d2cbc3);
  860. background: -o-linear-gradient(#cbc7bc, #d2cbc3);
  861. background: -webkit-gradient(linear, 0 0, 0 100%, from(#cbc7bc), to(#d2cbc3));
  862. background: -webkit-linear-gradient(#cbc7bc, #d2cbc3);
  863. background: linear-gradient(#cbc7bc, #d2cbc3);
  864. box-shadow:
  865. 0 -2px 5px rgba(255,255,255,0.05),
  866. 0 2px 5px rgba(255,255,255,0.1);
  867. }
  868. /* DEMO 4_s */
  869. .switch.demo4_s {
  870. width: 50px;
  871. height: 50px;
  872. }
  873. .switch.demo4_s label {
  874. border-radius: 50%;
  875. background: #b2ac9e;
  876. background: -moz-linear-gradient(#f7f2f6, #b2ac9e);
  877. background: -ms-linear-gradient(#f7f2f6, #b2ac9e);
  878. background: -o-linear-gradient(#f7f2f6, #b2ac9e);
  879. background: -webkit-gradient(linear, 0 0, 0 100%, from(#f7f2f6), to(#b2ac9e));
  880. background: -webkit-linear-gradient(#f7f2f6, #b2ac9e);
  881. background: linear-gradient(#f7f2f6, #b2ac9e);
  882. position: relative;
  883. color: #a5a39d;
  884. font-size: 30px;
  885. text-align: center;
  886. line-height: 50px;
  887. -webkit-transition: all 0.3s ease-out;
  888. -moz-transition: all 0.3s ease-out;
  889. -ms-transition: all 0.3s ease-out;
  890. -o-transition: all 0.3s ease-out;
  891. transition: all 0.3s ease-out;
  892. text-shadow: 0 2px 1px rgba(0,0,0,0.25);
  893. box-shadow:
  894. inset 0 2px 3px rgba(255,255,255,0.13),
  895. 0 5px 8px rgba(0,0,0,0.3),
  896. 0 10px 10px 4px rgba(0,0,0,0.3);
  897. z-index: -1;
  898. }
  899. .switch.demo4_s label:after {
  900. content: "";
  901. position: absolute;
  902. left: -20px;
  903. right: -20px;
  904. top: -20px;
  905. bottom: -20px;
  906. z-index: -2;
  907. border-radius: inherit;
  908. box-shadow:
  909. inset 0 1px 0 rgba(255,255,255,0.1),
  910. 0 1px 2px rgba(0,0,0,0.3),
  911. 0 0 10px rgba(0,0,0,0.15);
  912. }
  913. .switch.demo4_s label:before {
  914. content: "";
  915. position: absolute;
  916. left: -10px;
  917. right: -10px;
  918. top: -10px;
  919. bottom: -10px;
  920. z-index: -1;
  921. border-radius: inherit;
  922. box-shadow: inset 0 10px 10px rgba(0,0,0,0.13);
  923. -webkit-filter:blur(1px);
  924. -moz-filter:blur(1px);
  925. -ms-filter:blur(1px);
  926. -o-filter:blur(1px);
  927. filter: blur(1px);
  928. }
  929. .switch.demo4_s input:checked ~ label {
  930. box-shadow:
  931. inset 0 2px 3px rgba(255,255,255,0.13),
  932. 0 5px 8px rgba(0,0,0,0.35),
  933. 0 3px 10px 4px rgba(0,0,0,0.2);
  934. color: #9abb82;
  935. }
  936. .switch.demo4_s .icon-off:after {
  937. content: "";
  938. display: block;
  939. position: absolute;
  940. width: 70%;
  941. height: 70%;
  942. left: 50%;
  943. top: 50%;
  944. z-index: -1;
  945. margin: -35% 0 0 -35%;
  946. border-radius: 50%;
  947. background: #d2cbc3;
  948. background: -moz-linear-gradient(#cbc7bc, #d2cbc3);
  949. background: -ms-linear-gradient(#cbc7bc, #d2cbc3);
  950. background: -o-linear-gradient(#cbc7bc, #d2cbc3);
  951. background: -webkit-gradient(linear, 0 0, 0 100%, from(#cbc7bc), to(#d2cbc3));
  952. background: -webkit-linear-gradient(#cbc7bc, #d2cbc3);
  953. background: linear-gradient(#cbc7bc, #d2cbc3);
  954. box-shadow:
  955. 0 -2px 5px rgba(255,255,255,0.05),
  956. 0 2px 5px rgba(255,255,255,0.1);
  957. }
  958. /* DEMO 4_m */
  959. .switch.demo4_m {
  960. width: 100px;
  961. height: 100px;
  962. }
  963. .switch.demo4_m label {
  964. border-radius: 50%;
  965. background: #b2ac9e;
  966. background: -moz-linear-gradient(#f7f2f6, #b2ac9e);
  967. background: -ms-linear-gradient(#f7f2f6, #b2ac9e);
  968. background: -o-linear-gradient(#f7f2f6, #b2ac9e);
  969. background: -webkit-gradient(linear, 0 0, 0 100%, from(#f7f2f6), to(#b2ac9e));
  970. background: -webkit-linear-gradient(#f7f2f6, #b2ac9e);
  971. background: linear-gradient(#f7f2f6, #b2ac9e);
  972. position: relative;
  973. color: #a5a39d;
  974. font-size: 50px;
  975. text-align: center;
  976. line-height: 100px;
  977. -webkit-transition: all 0.3s ease-out;
  978. -moz-transition: all 0.3s ease-out;
  979. -ms-transition: all 0.3s ease-out;
  980. -o-transition: all 0.3s ease-out;
  981. transition: all 0.3s ease-out;
  982. text-shadow: 0 2px 1px rgba(0,0,0,0.25);
  983. box-shadow:
  984. inset 0 2px 3px rgba(255,255,255,0.13),
  985. 0 5px 8px rgba(0,0,0,0.3),
  986. 0 10px 10px 4px rgba(0,0,0,0.3);
  987. z-index: -1;
  988. }
  989. .switch.demo4_m label:after {
  990. content: "";
  991. position: absolute;
  992. left: -20px;
  993. right: -20px;
  994. top: -20px;
  995. bottom: -20px;
  996. z-index: -2;
  997. border-radius: inherit;
  998. box-shadow:
  999. inset 0 1px 0 rgba(255,255,255,0.1),
  1000. 0 1px 2px rgba(0,0,0,0.3),
  1001. 0 0 10px rgba(0,0,0,0.15);
  1002. }
  1003. .switch.demo4_m label:before {
  1004. content: "";
  1005. position: absolute;
  1006. left: -10px;
  1007. right: -10px;
  1008. top: -10px;
  1009. bottom: -10px;
  1010. z-index: -1;
  1011. border-radius: inherit;
  1012. box-shadow: inset 0 10px 10px rgba(0,0,0,0.13);
  1013. -webkit-filter:blur(1px);
  1014. -moz-filter:blur(1px);
  1015. -ms-filter:blur(1px);
  1016. -o-filter:blur(1px);
  1017. filter: blur(1px);
  1018. }
  1019. .switch.demo4_m input:checked ~ label {
  1020. box-shadow:
  1021. inset 0 2px 3px rgba(255,255,255,0.13),
  1022. 0 5px 8px rgba(0,0,0,0.35),
  1023. 0 3px 10px 4px rgba(0,0,0,0.2);
  1024. color: #9abb82;
  1025. }
  1026. .switch.demo4_m .icon-off:after {
  1027. content: "";
  1028. display: block;
  1029. position: absolute;
  1030. width: 70%;
  1031. height: 70%;
  1032. left: 50%;
  1033. top: 50%;
  1034. z-index: -1;
  1035. margin: -35% 0 0 -35%;
  1036. border-radius: 50%;
  1037. background: #d2cbc3;
  1038. background: -moz-linear-gradient(#cbc7bc, #d2cbc3);
  1039. background: -ms-linear-gradient(#cbc7bc, #d2cbc3);
  1040. background: -o-linear-gradient(#cbc7bc, #d2cbc3);
  1041. background: -webkit-gradient(linear, 0 0, 0 100%, from(#cbc7bc), to(#d2cbc3));
  1042. background: -webkit-linear-gradient(#cbc7bc, #d2cbc3);
  1043. background: linear-gradient(#cbc7bc, #d2cbc3);
  1044. box-shadow:
  1045. 0 -2px 5px rgba(255,255,255,0.05),
  1046. 0 2px 5px rgba(255,255,255,0.1);
  1047. }