-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c9ed05
commit fb04938
Showing
8 changed files
with
62 additions
and
16 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
min-height: 100vh; | ||
background-color: #f0f0f0; | ||
|
||
background-image: url(../img/bacground.jpg); | ||
background-size: 100vw 100vh; | ||
background-repeat: repeat-x; | ||
} | ||
|
||
#cheerpjDisplay { | ||
background-color: rgba(255, 255, 255, 0.5); | ||
color: #fff; | ||
padding: 20px; | ||
position: absolute; | ||
border-radius: 20px; | ||
border: none; | ||
box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.5);; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Get the element | ||
function center(id) { | ||
const element = document.getElementById(id); | ||
|
||
// Get the width and height of the element | ||
const elementWidth = element.offsetWidth; | ||
const elementHeight = element.offsetHeight; | ||
|
||
// Calculate the center of the window | ||
const windowWidth = window.innerWidth; | ||
const windowHeight = window.innerHeight; | ||
const centerX = (windowWidth - elementWidth) / 2; | ||
const centerY = (windowHeight - elementHeight) / 2; | ||
|
||
// Set the element's position to be centered | ||
element.style.left = `${centerX}px`; | ||
element.style.top = `${centerY}px`; | ||
} | ||
|
||
|
||
center('cheerpjDisplay') |
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