tetris.css 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. * {
  2. box-sizing: border-box;
  3. margin: 0;
  4. padding: 0;
  5. }
  6. body {
  7. font-family: 'Roboto', serif;
  8. }
  9. #tetris {
  10. display: flex;
  11. width: 560px;
  12. margin: 3em auto;
  13. }
  14. #my-canvas {
  15. width: 300px;
  16. height: 480px;
  17. }
  18. #info {
  19. display: flex;
  20. flex-direction: column;
  21. justify-content: space-between;
  22. height: 470px;
  23. width: 240px;
  24. }
  25. #info > #logo {
  26. flex-basis: auto;
  27. margin-top: 7px;
  28. padding: 5px 0;
  29. display: flex;
  30. align-items: center;
  31. justify-content: center;
  32. background-color: #b8caf4;
  33. }
  34. #info > #score-envelope {
  35. flex-basis: 8%;
  36. border: 2px solid #B0B0B0;
  37. border-radius: 5px;
  38. display: flex;
  39. align-items: center;
  40. font-weight: bold;
  41. }
  42. #info > #level-envelope {
  43. flex-basis: 8%;
  44. border: 2px solid #B0B0B0;
  45. border-radius: 5px;
  46. display: flex;
  47. align-items: center;
  48. font-weight: bold;
  49. }
  50. #info > #status-envelope {
  51. flex-basis: 8%;
  52. border: 2px solid #B0B0B0;
  53. border-radius: 5px;
  54. display: flex;
  55. align-items: center;
  56. font-weight: bold;
  57. }
  58. #info > #controls-envelope {
  59. flex-basis: auto;
  60. border: 2px solid #B0B0B0;
  61. border-radius: 5px;
  62. padding: 0.5em 0;
  63. display: flex;
  64. flex-direction: column;
  65. justify-content: center;
  66. }
  67. #info > #btn-reset {
  68. flex-basis: auto;
  69. }
  70. .button {
  71. margin: 0.4em;
  72. padding: 1em;
  73. text-align: center;
  74. cursor: pointer;
  75. outline: none;
  76. color: #fff;
  77. min-width: 100px;
  78. font-weight: bold;
  79. background-color: #537fe4;
  80. border: none;
  81. border-radius: 15px;
  82. box-shadow: 1px 2px #aaa;
  83. }
  84. .button:hover {
  85. background-color: #2B60DE;
  86. }
  87. .button:active {
  88. background-color: #2B60DE;
  89. box-shadow: 0 3px #888;
  90. transform: translateY(2px);
  91. }
  92. #controls > .one-btn {
  93. display: flex;
  94. justify-content: center;
  95. }
  96. #controls > .two-btn {
  97. display: flex;
  98. justify-content: space-between;
  99. }
  100. .label {
  101. text-transform: uppercase;
  102. font-weight: bold;
  103. margin-right: 0.5em;
  104. padding-left: 0.5em;
  105. }
  106. .source {
  107. display: flex;
  108. width: 540px;
  109. margin: -40px auto;
  110. font-size: 12px;
  111. }
  112. #btn-reset{
  113. background: #2B60DE;
  114. color: #fff;
  115. font-weight: bold;
  116. border: 0;
  117. padding: 12px 0;
  118. width: 100%;
  119. border-radius: 5px;
  120. text-transform: uppercase;
  121. font-size: 14px;
  122. cursor: pointer;
  123. outline: none;
  124. }
  125. #btn-reset:hover {
  126. background-color: #1e4fc2;
  127. }
  128. #btn-reset:active {
  129. background-color: #1e4fc2;
  130. transform: translateY(2px);
  131. }