|
| 1 | +/* |
| 2 | +JavaScript Snake |
| 3 | +By Patrick Gillespie |
| 4 | +http://patorjk.com/games/snake |
| 5 | +*/ |
| 6 | +@import url('https://fonts.googleapis.com/css2?family=Electrolize&display=swap'); |
| 7 | + |
| 8 | + |
| 9 | +body { |
| 10 | + margin:0px; |
| 11 | + padding:0px; |
| 12 | + background-color:teal; |
| 13 | +} |
| 14 | + |
| 15 | +.snake-toolbar { |
| 16 | + font-family: Electrolize; |
| 17 | + color: white; |
| 18 | +} |
| 19 | + |
| 20 | +#game-area { |
| 21 | + margin:10px; |
| 22 | + padding:0px; |
| 23 | +} |
| 24 | + |
| 25 | +#game-area:focus { outline: none; } |
| 26 | + |
| 27 | +#mode-wrapper { |
| 28 | + font-family: Electrolize; |
| 29 | + font-size: 14px; |
| 30 | + color: whitesmoke; |
| 31 | +} |
| 32 | + |
| 33 | +a.snake-link, a.snake-link:link, a.snake-link:visited { |
| 34 | + color: white; |
| 35 | +} |
| 36 | + |
| 37 | +a.snake-link:hover { |
| 38 | + color: white; |
| 39 | +} |
| 40 | + |
| 41 | +.snake-pause-screen { |
| 42 | + font-family: Electrolize; |
| 43 | + font-size: 16px; |
| 44 | + position:absolute; |
| 45 | + width:300px; |
| 46 | + height:80px; |
| 47 | + text-align:center; |
| 48 | + top:50%; |
| 49 | + left:50%; |
| 50 | + margin-top:-40px; |
| 51 | + margin-left:-150px; |
| 52 | + display:none; |
| 53 | + background-color:#3E2E44; |
| 54 | + color: whitesmoke; |
| 55 | +} |
| 56 | + |
| 57 | +.snake-panel-component { |
| 58 | + position: absolute; |
| 59 | + font-family: Electrolize; |
| 60 | + font-size: 16px; |
| 61 | + color: #938996; |
| 62 | + text-align: center; |
| 63 | + background-color: #3E2E44; |
| 64 | + padding: 8px; |
| 65 | + margin: 0px; |
| 66 | +} |
| 67 | + |
| 68 | +.snake-snakebody-block { |
| 69 | + margin: 0px; |
| 70 | + padding: 0px; |
| 71 | + background-color: orange; |
| 72 | + position: absolute; |
| 73 | + border: 0px solid black; |
| 74 | + background-repeat: no-repeat; |
| 75 | +} |
| 76 | + |
| 77 | +.snake-snakebody-alive { |
| 78 | + background-image: url('./images/snakeblock.png'); |
| 79 | +} |
| 80 | +.snake-snakebody-dead { |
| 81 | + background-image: url('./images/dead-dark-snakeblock.png'); |
| 82 | +} |
| 83 | + |
| 84 | +.snake-food-block { |
| 85 | + margin: 0px; |
| 86 | + padding: 0px; |
| 87 | + background-color: red; |
| 88 | + border: 2px solid black; |
| 89 | + position: absolute; |
| 90 | +} |
| 91 | + |
| 92 | +.snake-playing-field { |
| 93 | + margin: 0px; |
| 94 | + padding: 0px; |
| 95 | + position: absolute; |
| 96 | + background-color: rgb(0, 180, 180); |
| 97 | + border: 3px solid black; |
| 98 | +} |
| 99 | + |
| 100 | +.snake-game-container { |
| 101 | + margin: 0px; |
| 102 | + padding: 0px; |
| 103 | + border-width: 0px; |
| 104 | + border-style: none; |
| 105 | + zoom: 1; |
| 106 | + background-color: #3E2E44; |
| 107 | + position: relative; |
| 108 | +} |
| 109 | + |
| 110 | +.snake-welcome-dialog { |
| 111 | + padding: 8px; |
| 112 | + margin: 0px; |
| 113 | + background-color: black; |
| 114 | + color: whitesmoke; |
| 115 | + font-family: Electrolize; |
| 116 | + font-size: 14px; |
| 117 | + position: absolute; |
| 118 | + top: 50%; |
| 119 | + left: 50%; |
| 120 | + width: 300px; |
| 121 | + /*height: 150px;*/ |
| 122 | + margin-top: -100px; |
| 123 | + margin-left: -158px; |
| 124 | + text-align: center; |
| 125 | + display: block; |
| 126 | +} |
| 127 | + |
| 128 | +.snake-try-again-dialog, .snake-win-dialog { |
| 129 | + padding: 8px; |
| 130 | + margin: 0px; |
| 131 | + background-color: black; |
| 132 | + color: whitesmoke; |
| 133 | + font-family: Electrolize; |
| 134 | + font-size: 16px; |
| 135 | + position: absolute; |
| 136 | + top: 50%; |
| 137 | + left: 50%; |
| 138 | + width: 300px; |
| 139 | + height: 100px; |
| 140 | + margin-top: -75px; |
| 141 | + margin-left: -158px; |
| 142 | + text-align: center; |
| 143 | + display: none; |
| 144 | +} |
0 commit comments