style.css 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860
  1. @font-face {
  2. font-family: "a";
  3. /*中文字体*/
  4. src: url();
  5. font-display: swap;
  6. }
  7. @font-face {
  8. font-family: "b";
  9. src: url(../fonts/Ubuntu-Regular.ttf);
  10. font-display: swap;
  11. }
  12. @font-face {
  13. font-family: "title";
  14. /*英文字体*/
  15. src: url(../fonts/Pacifico-Regular.ttf);
  16. font-display: swap;
  17. }
  18. * {
  19. margin: 0;
  20. padding: 0;
  21. box-sizing: border-box;
  22. user-select: none;
  23. transition: background-color 0.2s ease;
  24. }
  25. a:hover,
  26. a:link,
  27. a:visited,
  28. a:active,
  29. a:focus {
  30. text-decoration: none;
  31. outline: none;
  32. border: none;
  33. color: inherit;
  34. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  35. }
  36. /* 设置滚动条样式 */
  37. ::-webkit-scrollbar {
  38. width: 0px;
  39. }
  40. ::-webkit-scrollbar-thumb {
  41. background-color: var(--main_text_color, #000000);
  42. border-radius: 8px;
  43. height: 20%;
  44. }
  45. ::-webkit-scrollbar-track {
  46. background-color: var(--main_bg_color, linear-gradient(50deg, #a2d0ff, #ffffff));
  47. }
  48. html[data-theme="Dark"] {
  49. --main_bg_color: rgb(0, 0, 0);
  50. --main_text_color: #fff;
  51. --gradient:linear-gradient(120deg, rgb(133, 62, 255), #f76cc6 30%, rgb(255, 255, 255) 60%);
  52. --purple_text_color: #747bff;
  53. --text_bg_color: rgb(26, 4, 48);
  54. --item_bg_color: rgb(19, 20, 24);
  55. --item_hover_color: rgb(19, 23, 27);
  56. --item_left_title_color: rgb(255, 255, 255);
  57. --item_left_text_color: rgb(142, 142, 142);
  58. --footer_text_color: #646464;
  59. --left_tag_item: linear-gradient(50deg, #1f2327, #000000);
  60. --card_filter: 0px;
  61. --back_filter: 0px;
  62. --back_filter_color: #00000000;
  63. --fill:#ffffff;
  64. }
  65. body {
  66. display: flex;
  67. height: 100%;
  68. min-height: 100vh;
  69. width: 100%;
  70. position: relative;
  71. font-family: "b", "a", sans-serif;
  72. background: var(--main_bg_color);
  73. background-repeat: no-repeat;
  74. background-size: cover;
  75. background-position: center;
  76. background-attachment: fixed;
  77. transition: color 0.1s ease;
  78. justify-content: center;
  79. color: var(--main_text_color);
  80. }
  81. #zyyo-loading {
  82. background: radial-gradient(white, #d8eaff);
  83. background-size: 100%;
  84. background-position: center;
  85. height: 100%;
  86. width: 100%;
  87. position: fixed;
  88. z-index: 999999;
  89. margin-top: 0px;
  90. top: 0px;
  91. pointer-events: none;
  92. opacity: 1;
  93. display: flex;
  94. justify-content: center;
  95. align-items: center;
  96. }
  97. #zyyo-loading-center {
  98. height: 150px;
  99. width: 150px;
  100. position: relative;
  101. border-radius: 50%;
  102. background: #472eff;
  103. animation: zoom 1s linear infinite;
  104. }
  105. @keyframes zoom {
  106. 0% {
  107. transform: scale(0);
  108. opacity: 1;
  109. }
  110. 50% {
  111. opacity: 0.5;
  112. }
  113. 100% {
  114. transform: scale(1);
  115. opacity: 0;
  116. }
  117. }
  118. .zyyo-filter {
  119. position: fixed;
  120. width: 100vw;
  121. height: 100vh;
  122. backdrop-filter: blur(var(--back_filter));
  123. -webkit-backdrop-filter: blur(var(--back-filter));
  124. z-index: -99999999;
  125. background: var(--back_filter_color);
  126. }
  127. .zyyo-main {
  128. width: 100%;
  129. transition: transform 0.5s ease;
  130. max-width: 1150px;
  131. position: relative;
  132. flex-direction: row;
  133. }
  134. .zyyo-left {
  135. overflow-y: scroll;
  136. width: 230px;
  137. height: 100vh;
  138. display: flex;
  139. padding: 0 15px;
  140. position: fixed;
  141. align-items: center;
  142. flex-direction: column;
  143. }
  144. .zyyo-left::-webkit-scrollbar {
  145. display: none;
  146. }
  147. .logo {
  148. flex-shrink: 0;
  149. width: 90%;
  150. position: relative;
  151. aspect-ratio: 1/1;
  152. margin-top: 50px;
  153. background-size: cover;
  154. border-radius: 50%;
  155. }
  156. .left-div {
  157. flex-shrink: 0;
  158. width: 100%;
  159. border-radius: 13px;
  160. margin-top: 15px;
  161. padding: 20px;
  162. backdrop-filter: blur(var(--card_filter));
  163. background: var(--item_bg_color);
  164. }
  165. .left-des {
  166. display: flex;
  167. flex-direction: column;
  168. justify-content: center;
  169. }
  170. .left-des-item {
  171. display: flex;
  172. align-items: center;
  173. line-height: 20px;
  174. font-size: 15px;
  175. margin-bottom: 5px;
  176. overflow: hidden;
  177. }
  178. .left-des-item i,.left-des-item svg{
  179. width: 16px;
  180. height: 16px;
  181. fill:var(--fill);
  182. font-size: 18px;
  183. margin-right: 10px;
  184. }
  185. .left-tag {
  186. display: flex;
  187. flex-direction: row;
  188. flex-wrap: wrap;
  189. padding: 14px;
  190. }
  191. .left-tag-item {
  192. display: flex;
  193. justify-content: center;
  194. align-items: center;
  195. height: 28px;
  196. margin: 0px 5px 5px 0;
  197. padding: 10px;
  198. font-size: 13px;
  199. border-radius: 10px;
  200. background: var(--left_tag_item);
  201. }
  202. #line {
  203. width: 100%;
  204. height: 200px;
  205. font-size: 13px;
  206. padding-left: 8px;
  207. scroll-snap-type: y mandatory;
  208. overflow-y: scroll;
  209. }
  210. #line li {
  211. list-style: none;
  212. position: relative;
  213. padding: 15px 0px 0px 15px;
  214. border-left: 2px solid #d5d5d5;
  215. border-radius: 0;
  216. scroll-snap-align: end;
  217. color: var(--main_text_color);
  218. }
  219. .focus {
  220. width: 8px;
  221. height: 8px;
  222. border-radius: 22px;
  223. background-color: rgb(255 255 255);
  224. border: 2px solid #fff;
  225. position: absolute;
  226. left: -5px;
  227. top: 50%;
  228. }
  229. #line li:first-child .focus:first-child {
  230. background-color: #aaffcd;
  231. animation: focus 1.8s ease infinite;
  232. }
  233. #line::-webkit-scrollbar {
  234. display: none;
  235. }
  236. .zyyo-right {
  237. width: calc(100% - 230px);
  238. display: flex;
  239. padding: 24px;
  240. position: relative;
  241. float: right;
  242. padding-bottom: 50px;
  243. flex-direction: column;
  244. }
  245. .welcome {
  246. font-size: 55px;
  247. font-weight: 800;
  248. margin: 20px 0;
  249. }
  250. .index-logo {
  251. flex-shrink: 0;
  252. width: 45%;
  253. margin-top: 30px;
  254. position: relative;
  255. aspect-ratio: 1/1;
  256. background-size: cover;
  257. border-radius: 50%;
  258. }
  259. .description {
  260. font-size: 20px;
  261. margin-top: 7px;
  262. }
  263. .gradientText {
  264. -webkit-background-clip: text;
  265. -webkit-text-fill-color: transparent;
  266. background-size: 200%;
  267. background-position: 0%;
  268. font-family: "title";
  269. animation: backgroundSizeAnimation 10s ease-in-out infinite;
  270. background-image: var(--gradient);
  271. }
  272. @keyframes backgroundSizeAnimation {
  273. 0% {
  274. background-position: 100%;
  275. }
  276. 25% {
  277. background-position: 50%;
  278. }
  279. 50% {
  280. background-position: 0%;
  281. }
  282. 75% {
  283. background-position: 50%;
  284. }
  285. 100% {
  286. background-position: 100%;
  287. }
  288. }
  289. .purpleText {
  290. color: var(--purple_text_color);
  291. font-weight: 800;
  292. }
  293. .textBackground {
  294. font-weight: 800;
  295. background: var(--text_bg_color);
  296. border-radius: 5px;
  297. font-size: 17px;
  298. padding: 2px 4px;
  299. }
  300. .iconContainer {
  301. width: 100%;
  302. height: 60px;
  303. display: flex;
  304. align-items: center;
  305. overflow-x: scroll;
  306. margin-top: 20px;
  307. }
  308. .iconContainer::-webkit-scrollbar {
  309. display: none;
  310. }
  311. .iconItem {
  312. width: 49px;
  313. height: 43px;
  314. box-sizing: border-box;
  315. border-radius: 7px;
  316. display: flex;
  317. margin-left: 10px;
  318. backdrop-filter: blur(var(--card_filter));
  319. background: var(--item_bg_color);
  320. align-items: center;
  321. justify-content: center;
  322. transition: width 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
  323. flex-shrink: 0;
  324. }
  325. .iconItem i,.iconItem svg{
  326. width: 22px;
  327. height: 22px;
  328. fill:var(--fill);
  329. font-size: 22px;
  330. margin-right: 3px;
  331. }
  332. .switch {
  333. width: 55px;
  334. height: 43px;
  335. box-sizing: border-box;
  336. border-radius: 7px;
  337. display: flex;
  338. margin-left: 10px;
  339. backdrop-filter: blur(var(--card_filter));
  340. background: var(--item_bg_color);
  341. align-items: center;
  342. justify-content: center;
  343. transition: width 1s ease, opacity 1s ease, transform 1s ease;
  344. flex-shrink: 0;
  345. }
  346. .iconTip {
  347. white-space: nowrap;
  348. display: none;
  349. }
  350. .iconItem:hover {
  351. width: 95px;
  352. transform: translateY(-2px);
  353. background: var(--item_hover_color);
  354. }
  355. .iconItem:hover .iconTip {
  356. display: block;
  357. }
  358. .switch:hover {
  359. width: 55px;
  360. /* transform: translateY(-2px); */
  361. background: var(--item_hover_color);
  362. }
  363. .tanChiShe {
  364. width: 85%;
  365. }
  366. .tanChiShe img {
  367. width: 100%;
  368. height: 100%;
  369. object-fit: cover;
  370. }
  371. .title {
  372. display: flex;
  373. align-items: center;
  374. font-size: 26px;
  375. font-weight: 800;
  376. margin: 20px 0;
  377. transition: transform 0.4s ease;
  378. }
  379. .title i ,.title svg{
  380. margin-right: 8px;
  381. height: 26px;
  382. width: 26px;
  383. fill:var(--fill);
  384. }
  385. .title:hover {
  386. transform: translateY(-5px);
  387. }
  388. .projectList {
  389. display: flex;
  390. flex-wrap: wrap;
  391. }
  392. .projectItem {
  393. margin: 7px;
  394. display: flex;
  395. background-color: var(--item_bg_color);
  396. border-radius: 8px;
  397. padding: 15px;
  398. height: 95px;
  399. width: calc(25% - 15px);
  400. backdrop-filter: blur(var(--card_filter));
  401. transition: opacity 0.3s ease, background-color 0.3s ease, border 0.3s ease, transform 0.2s ease;
  402. }
  403. .projectItem {
  404. display: flex;
  405. background-color: var(--item_bg_color);
  406. border-radius: 8px;
  407. padding: 15px;
  408. height: 100px;
  409. width: calc(25% - 15px);
  410. backdrop-filter: blur(var(--card_filter));
  411. transition: opacity 0.5s ease, background-color 0.2s ease, border 0.2s ease, transform 0.3s ease;
  412. }
  413. .projectItem:hover {
  414. box-shadow: 0 8px 16px -4px #2c2d300c;
  415. transform: translateY(-2px);
  416. }
  417. .projectItem.pressed {
  418. transform: scale(0.9);
  419. /* 缩小到原来的0.9倍 */
  420. background-color: var(--item_hover_color);
  421. }
  422. .projectItem:hover .projectItemLeft {
  423. width: 100%;
  424. }
  425. .projectItem:hover .projectItemRight {
  426. width: 0%;
  427. }
  428. .projectItem:hover .projectItemRight img {
  429. transform: rotate(40deg);
  430. }
  431. .projectItem:hover h1 {
  432. font-size: 18px;
  433. }
  434. .projectItemLeft p {
  435. font-size: 12px;
  436. margin-top: 15px;
  437. color: var(--item_left_text_color);
  438. }
  439. .projectItemLeft h1 {
  440. font-weight: normal;
  441. font-size: 16px;
  442. margin: 0px;
  443. transition: font-size 0.4s ease;
  444. color: var(--item_left_title_color);
  445. }
  446. .projectItemLeft {
  447. transition: width 0.4s ease;
  448. height: 100%;
  449. width: 80%;
  450. }
  451. .projectItemRight {
  452. overflow: hidden;
  453. transition: width 0.4s ease;
  454. display: flex;
  455. justify-content: center;
  456. align-items: center;
  457. width: 20%;
  458. height: 100%;
  459. }
  460. .projectItemRight img {
  461. height: 39px;
  462. width: 39px;
  463. }
  464. .skill {
  465. padding: 25px;
  466. width: 100%;
  467. }
  468. .skill img {
  469. width: 100%;
  470. height: 100%;
  471. object-fit: cover;
  472. }
  473. .skill #skillWap {
  474. display: none;
  475. }
  476. footer {
  477. position: absolute;
  478. padding: 10px;
  479. text-align: center;
  480. width: 100%;
  481. backdrop-filter: blur(var(--card_filter));
  482. background: var(--item_bg_color);
  483. color: var(--footer_text_color);
  484. font-size: 13px;
  485. bottom: 0;
  486. }
  487. @media (min-width: 800px) {
  488. .index-logo {
  489. display: none;
  490. }
  491. }
  492. @media (max-width: 1150px) {
  493. .a {
  494. width: calc(50% - 20px);
  495. }
  496. .projectItem{
  497. margin: 10px;
  498. }
  499. .b {
  500. width: calc(50% - 20px);
  501. }
  502. }
  503. @media (max-width: 800px) {
  504. .zyyo-left {
  505. display: none;
  506. }
  507. .a .projectItemRight {
  508. display: none;
  509. }
  510. .a .projectItemRight img {
  511. display: none;
  512. }
  513. .a .projectItemLeft {
  514. width: 100%;
  515. }
  516. .a {
  517. width: calc(50% - 18px);
  518. margin: 9px;
  519. }
  520. .b {
  521. height: 110px;
  522. margin: 8px 15px;
  523. width: calc(100% - 30px);
  524. }
  525. .zyyo-right {
  526. width: 100%;
  527. }
  528. .tanChiShe {
  529. width: 100%;
  530. }
  531. .description {
  532. font-size: 16px;
  533. }
  534. .welcome {
  535. font-size: 48px;
  536. }
  537. .projectItemLeft p {
  538. font-size: 13px;
  539. }
  540. .projectItemLeft h1 {
  541. font-size: 18px;
  542. }
  543. .projectItem:hover h1 {
  544. font-size: 20px;
  545. }
  546. .skill #skillWap {
  547. display: block;
  548. }
  549. .skill #skillPc {
  550. display: none;
  551. }
  552. }
  553. .tc {
  554. position: fixed;
  555. display: flex;
  556. visibility: hidden;
  557. width: 100vw;
  558. height: 100vh;
  559. backdrop-filter: blur(10px);
  560. background: rgba(20, 20, 20, 0.5);
  561. z-index: 99999;
  562. align-items: center;
  563. justify-content: center;
  564. flex-direction: column;
  565. }
  566. .tc-main {
  567. z-index: 100000;
  568. width: 80%;
  569. max-width: 300px;
  570. min-height: 200px;
  571. background-color: #ffffff;
  572. border-radius: 15px;
  573. display: flex;
  574. transition: transform 0.2s linear;
  575. align-items: center;
  576. justify-content: center;
  577. overflow: hidden;
  578. transform: translateY(50%) scale(0.7);
  579. }
  580. .tc-img {
  581. width: 100%;
  582. height: 100%;
  583. }
  584. .tc.active {
  585. visibility: visible;
  586. }
  587. .tc-main.active {
  588. transform: translateY(0) scale(1);
  589. }
  590. .onoffswitch {
  591. position: relative;
  592. width: 38px;
  593. height: 20px;
  594. -webkit-user-select: none;
  595. -moz-user-select: none;
  596. -ms-user-select: none;
  597. }
  598. .onoffswitch-checkbox {
  599. display: none;
  600. }
  601. .onoffswitch-label {
  602. display: block;
  603. overflow: hidden;
  604. cursor: pointer;
  605. height: 100%;
  606. border-radius: 50px;
  607. }
  608. .onoffswitch-inner {
  609. display: flex;
  610. justify-content: center;
  611. align-items: center;
  612. width: 200%;
  613. height: 100%;
  614. margin-left: -100%;
  615. transition: margin 0.2s ease-in 0s;
  616. }
  617. .onoffswitch-inner:before,
  618. .onoffswitch-inner:after {
  619. display: flex;
  620. justify-content: center;
  621. align-items: center;
  622. float: left;
  623. width: 50%;
  624. height: 100%;
  625. padding: 0;
  626. font-size: 12px;
  627. color: white;
  628. font-family: Trebuchet, Arial, sans-serif;
  629. font-weight: bold;
  630. box-sizing: border-box;
  631. }
  632. .onoffswitch-inner:before {
  633. content: "";
  634. background-color: rgb(110 110 110 / 50%);
  635. color: #FFFFFF;
  636. text-align: left;
  637. }
  638. .onoffswitch-inner:after {
  639. content: "";
  640. background-color: #272727;
  641. color: #FAFAFA;
  642. text-align: right;
  643. }
  644. .onoffswitch-switch {
  645. display: block;
  646. height: 70%;
  647. aspect-ratio: 1/1;
  648. background: #FFFFFF;
  649. position: absolute;
  650. top: 12.5%;
  651. bottom: 12.5%;
  652. right: 5px;
  653. border-radius: 20px;
  654. transition: right 0.2s ease-in 0s;
  655. }
  656. .onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner {
  657. margin-left: 0;
  658. }
  659. .onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch {
  660. right: 50%;
  661. }