button.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <script src="./dingtalk.open.2.10.3.js" rel="preload" as="script"></script>
  6. </head>
  7. <body>
  8. <!-- <div class="btns">
  9. <div class="btn java">JAVA攻城狮</div>
  10. <div class="btn golang">Golang工程师!</div>
  11. <div class="btn js"><span>js攻城狮</span></div>
  12. <div class="btn nodd-ruby ruby">
  13. <div class="anim"></div>
  14. <span>Ruby攻城狮</span>
  15. </div>
  16. <div class="btn vb">
  17. <span>VB攻城狮</span>
  18. <div class="dot"></div>
  19. </div>
  20. <div class="btn python python-1">python攻城狮</div>
  21. <div class="btn python python-2">python攻城狮</div>
  22. <div class="btn python python-3">python攻城狮</div>
  23. <div class="btn python python-4">python攻城狮</div>
  24. <div class="btn python python-5">python攻城狮</div>
  25. <div class="btn php php-1">php攻城狮</div>
  26. <div class="btn php php-2">php攻城狮</div>
  27. <div class="btn php php-3">php攻城狮</div>
  28. <div class="btn php php-4">php攻城狮</div>
  29. <div class="btn php php-5">php攻城狮</div>
  30. <div class="btn kotlin kotlin-3">kotlin攻城狮</div>
  31. <div class="btn kotlin kotlin-1">kotlin攻城狮</div>
  32. <div class="btn kotlin kotlin-4">kotlin攻城狮</div>
  33. <div class="btn kotlin kotlin-2">kotlin攻城狮</div>
  34. <div class="btn kotlin kotlin-5">kotlin攻城狮</div>
  35. <div class="btn c">C语言攻城狮</div>
  36. </div> -->
  37. </body>
  38. <style>
  39. .text-info {
  40. position: absolute;
  41. top: calc(50vh - 245px);
  42. text-align: center;
  43. font-size: 12px;
  44. color: #999;
  45. width: 100%;
  46. margin-left: -5px;
  47. }
  48. .btn {
  49. vertical-align: top;
  50. margin: 15px;
  51. display: inline-block;
  52. text-align: center;
  53. width: 122px;
  54. height: 44px;
  55. line-height: 44px;
  56. border-radius: 4px;
  57. color: #fff;
  58. cursor: pointer;
  59. }
  60. .java {
  61. color: #eb9e05;
  62. height: 42px;
  63. line-height: 42px;
  64. width: 120px;
  65. border: 1px solid #eb9e05;
  66. opacity: 1;
  67. transition: all 0.6s;
  68. }
  69. .java:hover {
  70. background: #eb9e05;
  71. color: #fff;
  72. }
  73. .java:active {
  74. opacity: 0.7;
  75. }
  76. .c {
  77. height: 44px;
  78. line-height: 44px;
  79. background: #55acee;
  80. transition: all 0.5s;
  81. box-shadow: 0px 5px 0px 0px #3486d5;
  82. }
  83. .c:hover {
  84. background-color: #6fc6ff;
  85. }
  86. .c:active {
  87. transform: translate(0px, 4px);
  88. -webkit-transform: translate(0px, 4px);
  89. box-shadow: 0px 1px 0px 0px #3486d5;
  90. }
  91. @keyframes sheen {
  92. 0% {
  93. transform: skewY(-45deg) translateX(0);
  94. }
  95. 100% {
  96. transform: skewY(-45deg) translateX(12.5em);
  97. }
  98. }
  99. .golang {
  100. vertical-align: top;
  101. height: 42px;
  102. line-height: 42px;
  103. width: 120px;
  104. color: #2194e0;
  105. border: 1px solid #2194e0;
  106. transition: all 0.2s ease-in-out;
  107. position: relative;
  108. opacity: 1;
  109. overflow: hidden;
  110. }
  111. .golang:before {
  112. content: "";
  113. background-color: rgba(255, 255, 255, 0.5);
  114. height: 100%;
  115. width: 3em;
  116. display: block;
  117. position: absolute;
  118. top: 0;
  119. left: -4.5em;
  120. transform: skewX(-45deg) translateX(0);
  121. transition: none;
  122. }
  123. .golang:hover {
  124. background-color: #2194e0;
  125. color: #fff;
  126. }
  127. .golang:hover:before {
  128. transform: skewX(-45deg) translateX(260px);
  129. transition: all 0.5s ease-in-out;
  130. }
  131. .golang:active {
  132. opacity: 0.8;
  133. }
  134. .js {
  135. width: 160px;
  136. height: 42px;
  137. line-height: 42px;
  138. background: #0d6;
  139. width: 120px;
  140. border: 1px solid #0d6;
  141. overflow: hidden;
  142. transition: all 0.5s;
  143. opacity: 1;
  144. }
  145. .js:hover,
  146. .js:active {
  147. text-decoration: none;
  148. color: #0c5;
  149. border-color: #0c5;
  150. background: #fff;
  151. }
  152. .js:active {
  153. opacity: 0.8;
  154. }
  155. .js span {
  156. display: inline-block;
  157. position: relative;
  158. padding-right: 0;
  159. transition: padding-right 0.5s;
  160. }
  161. .js span:after {
  162. content: " ";
  163. position: absolute;
  164. top: 0;
  165. right: -18px;
  166. opacity: 0;
  167. width: 10px;
  168. height: 10px;
  169. margin-top: -10px;
  170. background: rgba(0, 0, 0, 0);
  171. border: 2px solid #fff;
  172. border-top: none;
  173. border-right: none;
  174. transition: opacity 0.5s, top 0.5s, right 0.5s;
  175. transform: rotate(-140deg);
  176. }
  177. .js:hover span,
  178. .js:active span {
  179. padding-right: 30px;
  180. }
  181. .js:hover span:after,
  182. .js:active span:after {
  183. transition: opacity 0.5s, top 0.5s, right 0.5s;
  184. opacity: 1;
  185. border-color: #0c5;
  186. right: 0;
  187. top: calc(50% + 2.5px);
  188. transform: rotate(-140deg);
  189. }
  190. .nodd-ruby {
  191. background: #c147e6;
  192. position: relative;
  193. overflow: hidden;
  194. z-index: 0;
  195. cursor: pointer;
  196. opacity: 1;
  197. transition: all 0.3s;
  198. }
  199. input[type="checkbox"].toggle {
  200. -moz-appearance: none;
  201. -webkit-appearance: none;
  202. position: absolute;
  203. width: 100%;
  204. height: 100%;
  205. margin: 0;
  206. left: 0;
  207. top: 0;
  208. cursor: pointer;
  209. }
  210. input[type="checkbox"].toggle:focus {
  211. outline: 0;
  212. }
  213. .anim {
  214. transform: translate(-50%, -50%);
  215. position: absolute;
  216. top: 50%;
  217. left: 50%;
  218. z-index: -1;
  219. }
  220. .anim:before {
  221. position: relative;
  222. content: "";
  223. display: block;
  224. margin-top: 100%;
  225. }
  226. .anim:after {
  227. content: "";
  228. position: absolute;
  229. top: 0;
  230. bottom: 0;
  231. left: 0;
  232. right: 0;
  233. border-radius: 50%;
  234. }
  235. .node .toggle:checked + .anim {
  236. animation: 0.75s anim-in;
  237. }
  238. .node .toggle:checked + .anim:after {
  239. animation: anim-in-pseudo 0.75s;
  240. }
  241. .node .toggle:not(:checked) + .anim {
  242. animation: anim-out 0.75s;
  243. }
  244. .node .toggle:not(:checked) + .anim:after {
  245. animation: anim-out-pseudo 0.75s;
  246. }
  247. .node {
  248. background: #ed3f14;
  249. }
  250. .node:hover {
  251. opacity: 0.8;
  252. }
  253. .ruby:active {
  254. opacity: 0.8;
  255. }
  256. .ruby:hover > .anim {
  257. animation: anim-out 0.75s;
  258. }
  259. .ruby:hover > .anim:after {
  260. animation: anim-out-pseudo 0.75s;
  261. }
  262. @-webkit-keyframes anim-in {
  263. 0% {
  264. width: 0%;
  265. }
  266. 100% {
  267. width: 100%;
  268. }
  269. }
  270. @-moz-keyframes anim-in {
  271. 0% {
  272. width: 0%;
  273. }
  274. 100% {
  275. width: 100%;
  276. }
  277. }
  278. @-ms-keyframes anim-in {
  279. 0% {
  280. width: 0%;
  281. }
  282. 100% {
  283. width: 100%;
  284. }
  285. }
  286. @keyframes anim-in {
  287. 0% {
  288. width: 0%;
  289. }
  290. 100% {
  291. width: 100%;
  292. }
  293. }
  294. @-webkit-keyframes anim-in-pseudo {
  295. 0% {
  296. background: rgba(0, 0, 0, 0.3);
  297. }
  298. 100% {
  299. background: transparent;
  300. }
  301. }
  302. @-moz-keyframes anim-in-pseudo {
  303. 0% {
  304. background: rgba(0, 0, 0, 0.3);
  305. }
  306. 100% {
  307. background: transparent;
  308. }
  309. }
  310. @-ms-keyframes anim-in-pseudo {
  311. 0% {
  312. background: rgba(0, 0, 0, 0.3);
  313. }
  314. 100% {
  315. background: transparent;
  316. }
  317. }
  318. @keyframes anim-in-pseudo {
  319. 0% {
  320. background: rgba(0, 0, 0, 0.3);
  321. }
  322. 100% {
  323. background: transparent;
  324. }
  325. }
  326. @-webkit-keyframes anim-out {
  327. 0% {
  328. width: 0%;
  329. }
  330. 100% {
  331. width: 100%;
  332. }
  333. }
  334. @-moz-keyframes anim-out {
  335. 0% {
  336. width: 0%;
  337. }
  338. 100% {
  339. width: 100%;
  340. }
  341. }
  342. @-ms-keyframes anim-out {
  343. 0% {
  344. width: 0%;
  345. }
  346. 100% {
  347. width: 100%;
  348. }
  349. }
  350. @keyframes anim-out {
  351. 0% {
  352. width: 0%;
  353. }
  354. 100% {
  355. width: 100%;
  356. }
  357. }
  358. @-webkit-keyframes anim-out-pseudo {
  359. 0% {
  360. background: rgba(0, 0, 0, 0.35);
  361. }
  362. 100% {
  363. background: transparent;
  364. }
  365. }
  366. @-moz-keyframes anim-out-pseudo {
  367. 0% {
  368. background: rgba(0, 0, 0, 0.35);
  369. }
  370. 100% {
  371. background: transparent;
  372. }
  373. }
  374. @-ms-keyframes anim-out-pseudo {
  375. 0% {
  376. background: rgba(0, 0, 0, 0.35);
  377. }
  378. 100% {
  379. background: transparent;
  380. }
  381. }
  382. @keyframes anim-out-pseudo {
  383. 0% {
  384. background: rgba(0, 0, 0, 0.35);
  385. }
  386. 100% {
  387. background: transparent;
  388. }
  389. }
  390. .python {
  391. transition: 0.5s;
  392. background-size: 200% auto;
  393. }
  394. .python:hover {
  395. background-position: right center;
  396. }
  397. .python-1 {
  398. background-image: linear-gradient(
  399. to right,
  400. #f6d365 0%,
  401. #fda085 51%,
  402. #f6d365 100%
  403. );
  404. }
  405. .python-2 {
  406. background-image: linear-gradient(
  407. to right,
  408. #fbc2eb 0%,
  409. #a6c1ee 51%,
  410. #fbc2eb 100%
  411. );
  412. }
  413. .python-3 {
  414. background-image: linear-gradient(
  415. to right,
  416. #84fab0 0%,
  417. #8fd3f4 51%,
  418. #84fab0 100%
  419. );
  420. }
  421. .python-4 {
  422. background-image: linear-gradient(
  423. to right,
  424. #a1c4fd 0%,
  425. #c2e9fb 51%,
  426. #a1c4fd 100%
  427. );
  428. }
  429. .python-5 {
  430. background-image: linear-gradient(
  431. to right,
  432. #ffecd2 0%,
  433. #fcb69f 51%,
  434. #ffecd2 100%
  435. );
  436. }
  437. .php,
  438. .php::after {
  439. -webkit-transition: all 0.5s;
  440. -moz-transition: all 0.5s;
  441. -o-transition: all 0.5s;
  442. transition: all 0.5s;
  443. }
  444. .php {
  445. border: 1px solid #c147e6;
  446. color: #c147e6;
  447. width: 120px;
  448. height: 42px;
  449. line-height: 42px;
  450. position: relative;
  451. z-index: 1;
  452. text-transform: uppercase;
  453. }
  454. .php:hover {
  455. color: #fff;
  456. }
  457. .php::before,
  458. .php::after {
  459. background: #c147e6;
  460. content: "";
  461. position: absolute;
  462. z-index: -2;
  463. border-radius: 3px;
  464. }
  465. .php-1::after {
  466. height: 0;
  467. left: 0;
  468. top: 0;
  469. width: 100%;
  470. }
  471. .php-1:hover:after {
  472. height: 100%;
  473. }
  474. .php-2::after {
  475. height: 100%;
  476. left: 0;
  477. top: 0;
  478. width: 0;
  479. }
  480. .php-2:hover:after {
  481. width: 100%;
  482. }
  483. .php-3::after {
  484. height: 0;
  485. left: 50%;
  486. top: 50%;
  487. width: 0;
  488. }
  489. .php-3:hover:after {
  490. height: 100%;
  491. left: 0;
  492. top: 0;
  493. width: 100%;
  494. }
  495. .php-4::before {
  496. height: 100%;
  497. left: 0;
  498. top: 0;
  499. width: 100%;
  500. }
  501. .php-4::after {
  502. background: #fff;
  503. height: 100%;
  504. left: 0;
  505. top: 0;
  506. width: 100%;
  507. }
  508. .php-4:hover:after {
  509. height: 0;
  510. left: 50%;
  511. top: 50%;
  512. width: 0;
  513. }
  514. .php-5 {
  515. overflow: hidden;
  516. }
  517. .php-5::after {
  518. height: 100%;
  519. left: -35%;
  520. top: 0;
  521. transform: skew(50deg);
  522. transition-duration: 0.6s;
  523. transform-origin: top left;
  524. width: 0;
  525. }
  526. .php-5:hover:after {
  527. height: 100%;
  528. width: 135%;
  529. }
  530. .kotlin {
  531. background: none;
  532. border: 1px solid;
  533. width: 120px;
  534. height: 42px;
  535. line-height: 42px;
  536. letter-spacing: inherit;
  537. text-transform: inherit;
  538. transition: color 1s;
  539. }
  540. .kotlin-1 {
  541. color: #9c89f7;
  542. }
  543. .kotlin-1:hover {
  544. animation: halftone 1s forwards;
  545. background: radial-gradient(circle, #9c89f7 0.2em, transparent 0.25em) 0 0/1.25em
  546. 1.25em,
  547. radial-gradient(circle, #9c89f7 0.2em, transparent 0.25em) 6.25em 6.25em/1.25em
  548. 1.25em;
  549. color: #e4f789;
  550. }
  551. @keyframes halftone {
  552. 100% {
  553. background-size: 2.375em 2.375em, 0.1em 0.1em;
  554. }
  555. }
  556. .kotlin-2 {
  557. color: #82f6d8;
  558. }
  559. .kotlin-2:hover {
  560. animation: stripes-move 0.75s infinite linear;
  561. background: repeating-linear-gradient(
  562. 45deg,
  563. #82f6d8 0,
  564. #82f6d8 0.25em,
  565. transparent 0.25em,
  566. transparent 0.5em
  567. );
  568. color: #f682a0;
  569. }
  570. @keyframes stripes-move {
  571. 100% {
  572. background-position: 5em 0px;
  573. }
  574. }
  575. .kotlin-3 {
  576. color: #d3f169;
  577. }
  578. .kotlin-3:hover {
  579. animation: sawtooth 0.35s infinite linear;
  580. background: linear-gradient(45deg, #d3f169 0.5em, transparent 0.5em) 0 0/1em
  581. 1em,
  582. linear-gradient(-45deg, #d3f169 0.5em, transparent 0.5em) 0 0/1em 1em;
  583. color: #8769f1;
  584. }
  585. @keyframes sawtooth {
  586. 100% {
  587. background-position: 1em 0;
  588. }
  589. }
  590. .kotlin-4 {
  591. color: #eea163;
  592. }
  593. .kotlin-4:hover {
  594. animation: zigzag 1s linear infinite;
  595. background: linear-gradient(
  596. 135deg,
  597. rgba(238, 161, 99, 0.25) 0.25em,
  598. transparent 0.25em
  599. ) -0.5em 0,
  600. linear-gradient(
  601. 225deg,
  602. rgba(238, 161, 99, 0.25) 0.25em,
  603. transparent 0.25em
  604. ) -0.5em 0,
  605. linear-gradient(
  606. 315deg,
  607. rgba(238, 161, 99, 0.25) 0.25em,
  608. transparent 0.25em
  609. )
  610. 0 0,
  611. linear-gradient(
  612. 45deg,
  613. rgba(238, 161, 99, 0.25) 0.25em,
  614. transparent 0.25em
  615. )
  616. 0 0;
  617. background-size: 0.75em 0.75em;
  618. color: #63b0ee;
  619. }
  620. @keyframes zigzag {
  621. 100% {
  622. background-position: 1em 0, 1em 0, -0.75em 0, -0.75em 0;
  623. }
  624. }
  625. .kotlin-5 {
  626. color: #f9879b;
  627. }
  628. .kotlin-5:hover {
  629. animation: pulse 1s ease-in infinite;
  630. background: radial-gradient(
  631. circle,
  632. rgba(249, 135, 155, 0.25) 43%,
  633. transparent 50%
  634. )
  635. 0 0/1em 1em,
  636. radial-gradient(circle, rgba(249, 135, 155, 0.25) 43%, transparent 50%)
  637. 0.5em 0.5em/2em 2em;
  638. color: #0bdcb7;
  639. }
  640. @keyframes pulse {
  641. 50% {
  642. background-position: 0.66em 0.66em, -0.33em -0.33em;
  643. }
  644. 100% {
  645. background-size: 2em 2em, 1em 1em;
  646. background-position: -1.5em -1.5em, -1em -1em;
  647. }
  648. }
  649. .vb:before,
  650. .vb:after {
  651. box-sizing: border-box;
  652. }
  653. .vb {
  654. position: relative;
  655. width: 120px;
  656. color: #fa5555;
  657. height: 40px;
  658. line-height: 42px;
  659. border: 2px solid #fa5555;
  660. border-radius: 14px;
  661. text-transform: uppercase;
  662. }
  663. .dot {
  664. content: "";
  665. position: absolute;
  666. top: 0;
  667. width: 32px;
  668. height: 100%;
  669. border-radius: 50%;
  670. transition: all 300ms ease;
  671. display: none;
  672. }
  673. .dot:after {
  674. content: "";
  675. position: absolute;
  676. top: -6px;
  677. height: 5px;
  678. width: 5px;
  679. background: #fa5555;
  680. border-radius: 50%;
  681. border: 4px solid #fa5555;
  682. box-shadow: 0 0 0.7em #fff, 0 0 2em #fa5555;
  683. }
  684. .vb:hover .dot,
  685. .vb:focus .dot {
  686. animation: atom 2s infinite linear;
  687. display: block;
  688. }
  689. /*calc(122px - 36px) 按钮宽度 - dot宽度 - 边框宽度*/
  690. @keyframes atom {
  691. 0% {
  692. transform: translateX(0) rotate(0);
  693. }
  694. 30% {
  695. transform: translateX(calc(122px - 36px)) rotate(0);
  696. }
  697. 50% {
  698. transform: translateX(calc(122px - 36px)) rotate(180deg);
  699. }
  700. 80% {
  701. transform: translateX(0) rotate(180deg);
  702. }
  703. 100% {
  704. transform: translateX(0) rotate(360deg);
  705. }
  706. }
  707. .btn-down {
  708. position: absolute;
  709. top: calc(50vh - 280px);
  710. text-align: center;
  711. border-radius: 4px;
  712. cursor: pointer;
  713. left: calc(50vw - 87px);
  714. width: 122px;
  715. line-height: 44px;
  716. color: #fff;
  717. background: #2194e0;
  718. opacity: 1;
  719. }
  720. .btn-down:active {
  721. opacity: 0.8;
  722. }
  723. </style>
  724. </html>