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