style.css 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. html{
  2. width: 100vw;
  3. height: 100vh;
  4. }
  5. body{
  6. margin: 0;
  7. padding: 0;
  8. display: flex;
  9. flex-direction: column;
  10. width: 100%;
  11. height: 100%;
  12. position: relative;
  13. }
  14. body::before{
  15. content: "";
  16. position: absolute;
  17. z-index: -1;
  18. width: 100%;
  19. height: 100%;
  20. background: url("bacgroung_fortune_teller.jpg") ;
  21. opacity: 0.8;
  22. background-size: cover;
  23. background-repeat: no-repeat;
  24. background-position: center;
  25. }
  26. .card{
  27. display: flex;
  28. justify-content: center;
  29. align-items: center;
  30. width: 200px;
  31. height: 300px;
  32. border: 1px solid grey;
  33. border-radius: 15px;
  34. font-size: 200px;
  35. color: darkslategrey;
  36. }
  37. #wrapper{
  38. margin: auto;
  39. display: flex;
  40. flex-direction: column;
  41. align-items: center;
  42. perspective: 1000px;
  43. }
  44. #card{
  45. position: relative;
  46. width: 200px;
  47. height: 300px;
  48. transform-style: preserve-3d;
  49. transition: transform .5s;
  50. }
  51. #back-face{
  52. position: absolute;
  53. background: url("./back-red_large-1024x1024.png");
  54. background-position: center;
  55. background-size: cover;
  56. backface-visibility: hidden;
  57. }
  58. #front-face{
  59. transform: rotateY(180deg);
  60. position: absolute;
  61. background: #f1e8b8;
  62. }
  63. .table{
  64. display: flex;
  65. }
  66. .memory-card{
  67. transform-style: preserve-3d;
  68. box-shadow: 1px 1px 0 rgba(0, 0, 0, .3);
  69. transform: scale(1);
  70. background: #f1e8b8;
  71. cursor: pointer;
  72. margin: 0 5px;
  73. }
  74. .memory-card:active{
  75. transform: scale(0.97);
  76. transition: transform .2s;
  77. }
  78. .textResult{
  79. width: 100px;
  80. height: 40px;
  81. }
  82. #card.flip{
  83. transform: rotateY(180deg);
  84. }
  85. .hidden{
  86. opacity: 0;
  87. }
  88. #textResult{
  89. margin: 5px auto;
  90. text-align: center;
  91. font-size: 30px;
  92. font-style: italic;
  93. border-radius: 10px;
  94. color: red;
  95. background: #f1e8b8;
  96. width: 200px;
  97. }
  98. #btn{margin-top: 5px;
  99. font-size: 20px;
  100. background: #f1e8b8;
  101. width: 150px;
  102. height: 35px;
  103. border-radius: 15px;
  104. border: 1px solid lightgray;
  105. }