-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I have added a instructions modal, which includes all the instructions and it can be called whenever in game by pressing i,the game gets paused while on the instructions modal. I also changed gravity so that it can be playable ![image](https://github.com/Git21221/JS-beginner-projects/assets/125902846/56502e6d-ea44-40f8-8d26-bc2a4c475bae)
- Loading branch information
Showing
3 changed files
with
140 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,71 @@ | ||
body{ | ||
body { | ||
text-align: center; | ||
} | ||
|
||
margin: 0; | ||
padding: 0; | ||
font-family: Arial, sans-serif; | ||
background-color: #f0f0f0; | ||
overflow: hidden; /* Prevent scrollbar */ | ||
} | ||
#board{ | ||
position: absolute; | ||
position: relative; | ||
background-image: url("./images/fb-game-background.png"); | ||
margin: 0 auto; | ||
display: block; | ||
} | ||
#ground{ | ||
position: relative; | ||
background-image: url("./images/bottom-background.png"); | ||
width: 360px; | ||
height: 50px; | ||
margin: 0 auto; | ||
} | ||
/* Instructions Modal */ | ||
.modal { | ||
display: none; | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background-color: rgba(0, 0, 0, 0.7); | ||
z-index: 1; | ||
overflow: auto; | ||
} | ||
.modal-content { | ||
background-color: #fff; | ||
margin: 15% auto; | ||
padding: 20px; | ||
border: 1px solid #888; | ||
width: 60%; | ||
max-width: 400px; | ||
border-radius: 5px; | ||
text-align: center; | ||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); | ||
} | ||
|
||
.modal h2 { | ||
font-size: 24px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.modal p { | ||
font-size: 16px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
#startGameBtn { | ||
background-color: #008CBA; | ||
color: #fff; | ||
border: none; | ||
padding: 10px 20px; | ||
text-align: center; | ||
text-decoration: none; | ||
display: inline-block; | ||
bottom: -635px; | ||
} | ||
font-size: 16px; | ||
border-radius: 5px; | ||
cursor: pointer; | ||
transition: background-color 0.3s; | ||
} | ||
#startGameBtn:hover { | ||
background-color: #005F7F; | ||
} |