main.css 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. html {
  2. box-sizing: border-box;
  3. }
  4. *, ::after, ::before {
  5. box-sizing: inherit;
  6. }
  7. .container {
  8. max-width: 1150px;
  9. margin: 0 auto;
  10. text-align: center;
  11. padding: 10px;
  12. }
  13. .card__box {
  14. min-height: 460px;
  15. max-width: 600px;
  16. position: relative;
  17. margin: 10px auto;
  18. padding: 35px 50px 50px 50px;
  19. background-color:#0d5825;
  20. font-size: 25px;
  21. color:aliceblue;
  22. margin-bottom: 100px;
  23. }
  24. blockquote, p {
  25. margin: 0;
  26. }
  27. blockquote {
  28. margin-bottom: 90px;
  29. }
  30. .card {
  31. position: absolute;
  32. left: 50%;
  33. transform: translate(-15%, 5%) rotate(10deg);
  34. z-index:3;
  35. transition: all 0.3S ease-in;
  36. }
  37. .card:last-child {
  38. transform: translate(-85%, -5%) rotate(-25deg);
  39. z-index: 1;
  40. }
  41. .card:nth-child(2) {
  42. transform: translate(-50%, -5%) rotate(-10deg);
  43. z-index: 2;
  44. }
  45. .card:hover {
  46. transform: translate(-15%, -10%) rotate(10deg);
  47. cursor: pointer;
  48. }
  49. .card:nth-child(2):hover {
  50. transform: translate(-50%, -15%) rotate(-10deg);
  51. z-index: 2;
  52. cursor: pointer;
  53. }
  54. .card:last-child:hover {
  55. transform: translate(-85%, -15%) rotate(-25deg);
  56. cursor: pointer;
  57. }
  58. .box__wrapper{
  59. position: relative;
  60. margin-bottom: 100px;
  61. }
  62. .box {
  63. height: 60px;
  64. width: 60px;
  65. position: absolute;
  66. top: 0;
  67. left: 50%;
  68. background-color:rgb(127, 241, 127);
  69. }
  70. .box:first-child {
  71. background-color:rgb(147, 85, 192);
  72. top: -33px;
  73. left: 47%;
  74. z-index: 5;
  75. }
  76. .box:last-child {
  77. background-color:rgb(241, 95, 76);
  78. top: -68px;
  79. left: 44%;
  80. }
  81. @keyframes boxRuning {
  82. 0% {
  83. background-color:red;
  84. left: 0;
  85. top: 0;
  86. }
  87. 25% {
  88. background-color:blue;
  89. left: 0px;
  90. top: 200px;
  91. }
  92. 50% {
  93. background-color:green;
  94. left: 200px;
  95. top: 200px;
  96. }
  97. 75% {
  98. background-color:yellow;
  99. left: 200px;
  100. top: 0;
  101. }
  102. 100% {
  103. background-color:red;
  104. left: 0;
  105. top: 0;
  106. }
  107. }
  108. .header {
  109. width: 245px;
  110. position: fixed;
  111. top: 0;
  112. left:-205px;
  113. bottom: 0;
  114. background-color:#808080;
  115. color:#fff;
  116. padding:20px 30px;
  117. font-size: 16px;
  118. text-transform: uppercase;
  119. }
  120. .header::after {
  121. content:attr(data-name);
  122. position: absolute;
  123. top: 50%;
  124. right: -25px;
  125. transform: rotate(90deg);
  126. transition: all .3s ease-in;
  127. opacity: 1;
  128. visibility: visible;
  129. }
  130. .header:hover {
  131. transition: all .3s ease-in;
  132. left:0px;
  133. }
  134. .header:hover::after {
  135. transition: all .3s ease-in;
  136. opacity: 0;
  137. visibility: hidden;
  138. }
  139. .header a {
  140. color:inherit;
  141. text-decoration: none;
  142. text-transform: uppercase;
  143. }
  144. .nav_list {
  145. list-style: none;
  146. padding: 0;
  147. margin: 0;
  148. }
  149. .nav_item {
  150. margin-left: 20px;
  151. margin-bottom: 10px;
  152. position: relative;
  153. }
  154. .nav_item::before {
  155. content:'';
  156. position: absolute;
  157. width: 12px;
  158. height: 12px;
  159. left:-25px;
  160. background-color:rgb(255, 236, 60);
  161. transform: rotate(45deg) translateY(50%);
  162. border: solid 1px black;
  163. }
  164. .header a:hover {
  165. transition: all 0.4s ease-in;
  166. color: rgb(255, 236, 60);
  167. }
  168. .space {
  169. height: 100px;
  170. }
  171. .box_animation {
  172. width: 300px;
  173. height: 300px;
  174. position: relative;
  175. margin: 0 auto;
  176. }
  177. .box_run {
  178. width: 100px;
  179. height: 100px;
  180. background-color:red;
  181. position: absolute;
  182. animation: boxRuning 3.5s ease-in 0s infinite;
  183. }