togglestyle.css 17 KB

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