main.css 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. .box {
  2. width: 550px;
  3. height: 550px;
  4. background: #0d5825;
  5. margin-left: 30px;
  6. }
  7. blockquote {
  8. color: white;
  9. padding-top: 30px;
  10. font-size: 25px;
  11. text-align: center;
  12. }
  13. .cards {
  14. position: relative;
  15. width: 150px;
  16. top: 130px;
  17. left: 255px;
  18. }
  19. .first,
  20. .second,
  21. .third {
  22. position: absolute;
  23. width: 150px;
  24. transition: all 0.3s linear;
  25. }
  26. .first {
  27. z-index: 1;
  28. transform: rotate(7deg);
  29. }
  30. .second {
  31. transform: rotate(-25deg);
  32. left: -108px;
  33. top: -22px;
  34. }
  35. .third {
  36. transform: rotate(-11deg);
  37. left: -56px;
  38. top: -17px;
  39. }
  40. .first:hover {
  41. transform: translateY(-20px) rotate(7deg);
  42. }
  43. .second:hover {
  44. transform: translateY(-20px) rotate(-25deg);
  45. }
  46. .third:hover {
  47. transform: translateY(-20px) rotate(-11deg);
  48. }
  49. .squares {
  50. padding: 150px;
  51. margin-bottom: 100px;
  52. }
  53. .square1,
  54. .square2,
  55. .square3 {
  56. position: absolute;
  57. width: 100px;
  58. height: 100px;
  59. }
  60. .square1 {
  61. transform: translateX(50px) translateY(-50px);
  62. background: rgb(238, 128, 165);
  63. }
  64. .square2 {
  65. z-index: 1;
  66. transform: translateX(110px) translateY(10px);
  67. background: rgb(139, 144, 219);
  68. }
  69. .square3 {
  70. transform: translateX(170px) translateY(70px);
  71. background: rgb(99, 238, 64);
  72. }
  73. .menu_block {
  74. position: relative;
  75. width: 200px;
  76. height: 400px;
  77. background: rgb(170, 168, 168);
  78. left: -180px;
  79. transition: all 0.3s linear;
  80. }
  81. .menu_btn {
  82. position: absolute;
  83. transform: translateX(145px) translateY(190px) rotate(90deg);
  84. color: white;
  85. font-size: 15px;
  86. }
  87. .menu {
  88. position: absolute;
  89. margin-top: 10px;
  90. }
  91. li > a {
  92. text-decoration: none;
  93. color: white;
  94. font-size: 13px;
  95. }
  96. li {
  97. list-style-type: none;
  98. margin-top: 2px;
  99. }
  100. li:before {
  101. content: "";
  102. width: 12px;
  103. height: 12px;
  104. background: orange;
  105. display: block;
  106. border: 1px solid black;
  107. transform: translateX(-20px) translateY(15px) rotate(45deg);
  108. }
  109. .menu_block:hover {
  110. left: 0;
  111. }
  112. li a:hover {
  113. color: orange;
  114. }
  115. .menu_block:hover .menu_btn {
  116. opacity: 0;
  117. }
  118. .animation {
  119. height: 300px;
  120. overflow: hidden;
  121. margin-top: 100px;
  122. }
  123. .square {
  124. width: 100px;
  125. height: 100px;
  126. animation: anim1 3s ease infinite, anim2 3s ease infinite;
  127. }
  128. @keyframes anim1{
  129. 0%{margin-top: 0px; margin-left: 0px}
  130. 25%{margin-top:200px; margin-left: 0px}
  131. 50%{margin-top:200px; margin-left: 200px}
  132. 75%{margin-top:0px; margin-left: 200px}
  133. 100%{margin-left:0px; margin-top: 0px}
  134. }
  135. @keyframes anim2{
  136. 0%{background :red;}
  137. 25%{background: blue;}
  138. 50%{background:green;}
  139. 100%{background:yellow;}
  140. }