style.css 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. header,
  2. .cards,
  3. .boxs,
  4. .square {
  5. height: 100vh;
  6. }
  7. .container {
  8. max-width: 1270px;
  9. padding: 20px 15px 0;
  10. margin: 0 auto;
  11. }
  12. /* header */
  13. .wrapper {
  14. height: 100vh;
  15. width: 20%;
  16. background-color: grey;
  17. font-size: 20px;
  18. display: flex;
  19. align-items: center;
  20. justify-content: space-between;
  21. transition: all 0.8s ease;
  22. transform: translateX(-80%);
  23. }
  24. .wrapper:hover {
  25. transform: translateX(0);
  26. }
  27. .header li {
  28. margin-bottom: 50px;
  29. position: relative;
  30. left: 25px;
  31. }
  32. .header li::before {
  33. content: "";
  34. width: 20px;
  35. height: 20px;
  36. background: url("../images/rhombus.png") no-repeat;
  37. background-size: 20px;
  38. position: absolute;
  39. top: 2px;
  40. left: -25px;
  41. }
  42. .header a {
  43. color: white;
  44. transition: all 0.6s ease;
  45. }
  46. .header a:hover {
  47. color: orange;
  48. }
  49. .close {
  50. color: white;
  51. writing-mode: vertical-rl;
  52. margin-right: 20px;
  53. transition: 0.8s ease;
  54. }
  55. .wrapper:hover .close {
  56. opacity: 0;
  57. }
  58. /* cards */
  59. .cards {
  60. position: relative;
  61. background-color: #0d5825;
  62. }
  63. .cards__block {
  64. position: absolute;
  65. top: 50%;
  66. left: 0;
  67. right: 0;
  68. bottom: 0;
  69. transform: translate(0, -50%);
  70. }
  71. .cards__text {
  72. color: white;
  73. font-size: 25px;
  74. margin-bottom: 50px;
  75. }
  76. .cards__blockquote,
  77. .cards__paragraph,
  78. .cards__cite {
  79. margin: 0;
  80. text-align: center;
  81. }
  82. .cards__paragraph {
  83. font-weight: bold;
  84. }
  85. .blocks {
  86. position: absolute;
  87. height: auto;
  88. width: 100px;
  89. right: 0;
  90. left: 0;
  91. margin: 0 auto;
  92. }
  93. .block__img {
  94. width: 150px;
  95. position: absolute;
  96. }
  97. .block__img-first {
  98. top: 4px;
  99. right: 25px;
  100. transform: rotate(-20deg);
  101. }
  102. .block__img-first:hover {
  103. transform: translateY(-20px) rotate(-20deg);
  104. }
  105. .block__img-second {
  106. top: 15px;
  107. right: -15px;
  108. transform: rotate(-2deg);
  109. }
  110. .block__img-second:hover {
  111. transform: translateY(-20px) rotate(-2deg);
  112. }
  113. .block__img-third {
  114. top: 35px;
  115. right: -55px;
  116. transform: rotate(197deg);
  117. }
  118. .block__img-third:hover {
  119. transform: translateY(-20px) rotate(197deg);
  120. }
  121. /* boxs */
  122. .boxs {
  123. position: relative;
  124. }
  125. .box__pink,
  126. .box__blue,
  127. .box__green {
  128. position: absolute;
  129. width: 200px;
  130. height: 200px;
  131. margin: 0 auto;
  132. top: 50%;
  133. left: 0;
  134. right: 0;
  135. bottom: 0;
  136. transform: translate(0, -50%);
  137. }
  138. .box__pink {
  139. background-color: plum;
  140. transform: translate(-70%, -120%);
  141. }
  142. .box__blue {
  143. background-color: royalblue;
  144. transform: translate(0, -50%);
  145. z-index: 1;
  146. }
  147. .box__green {
  148. background-color: rgb(113, 177, 113);
  149. transform: translate(70%, 20%);
  150. }
  151. /* square */
  152. .square {
  153. display: flex;
  154. justify-content: center;
  155. align-items: center;
  156. }
  157. .square__block {
  158. width: 500px;
  159. height: 500px;
  160. border: 3px solid palevioletred;
  161. position: relative;
  162. }
  163. .square__box {
  164. width: 100px;
  165. height: 100px;
  166. position: absolute;
  167. left: 0;
  168. top: 0;
  169. animation-name: random;
  170. animation-duration: 6s;
  171. animation-iteration-count: infinite;
  172. }
  173. @keyframes random {
  174. 0% {
  175. background-color: rgb(179, 144, 204);
  176. left: 0;
  177. top: 0;
  178. }
  179. 25% {
  180. top: calc(100% - 100px);
  181. bottom: 0;
  182. left: 0;
  183. background-color: lightcoral;
  184. }
  185. 50% {
  186. left: calc(100% - 100px);
  187. bottom: 0;
  188. top: calc(100% - 100px);
  189. background-color: lightskyblue;
  190. }
  191. 75% {
  192. left: calc(100% - 100px);
  193. bottom: calc(100% - 100px);
  194. top: 0;
  195. background-color: palegoldenrod;
  196. }
  197. 100% {
  198. left: 0;
  199. top: 0;
  200. background-color: tomato;
  201. }
  202. }