From 5fc5c51385e3ebd02648ddfc6d525fb683d0ee14 Mon Sep 17 00:00:00 2001 From: Shreyansh shrey Date: Fri, 13 Aug 2021 12:07:44 +0530 Subject: [PATCH 1/3] Fix: streachy image on memory game --- static/css/memory-game.css | 96 ++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 46 deletions(-) diff --git a/static/css/memory-game.css b/static/css/memory-game.css index 6634d53..2bd7fdb 100644 --- a/static/css/memory-game.css +++ b/static/css/memory-game.css @@ -1,60 +1,64 @@ -*{ - /*Adding a reset to all items*/ - padding: 0%; - margin: 0%; - box-sizing: border-box; +* { + /*Adding a reset to all items*/ + padding: 0%; + margin: 0%; + box-sizing: border-box; } -body{ - height: 100vh; - background-image:url("../images/memory-game/Gifs/Background.jpg"); -} -.memory-game{ - width: 680px; - height: 640px; - /*this bring the game in center of page*/ - margin:auto; - display: flex; - flex-wrap: wrap; - perspective: 1000px; +body { + height: 100vh; + background-image: url("../images/memory-game/Gifs/Background.jpg"); +} +.memory-game { + width: 680px; + height: 640px; + /*this bring the game in center of page*/ + margin: auto; + display: flex; + flex-wrap: wrap; + perspective: 1000px; +} + +.memory-game img { + object-fit: cover; } -.memory-card{ - width: calc(25% - 10px); - /*calc remove the margin area form the width*/ - height: calc(33.33% - 10px); - /*calc remove the margin area form the height*/ - position: relative; - margin: 5px; - box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3); - /*For the image to comeback to its original shape after it shrinked on clicking*/ - transform: scale(1); - transform-style: preserve-3d; - transition: transform .5s; +.memory-card { + width: calc(25% - 10px); + /*calc remove the margin area form the width*/ + height: calc(33.33% - 10px); + /*calc remove the margin area form the height*/ + position: relative; + margin: 5px; + box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3); + /*For the image to comeback to its original shape after it shrinked on clicking*/ + transform: scale(1); + transform-style: preserve-3d; + transition: transform 0.5s; } .memory-card.flip { - transform: rotateY(180deg); - } + transform: rotateY(180deg); +} -.memory-card:active{ - /*Image shrinks to its 80%*/ - transform: scale(.75); - /*Then comes back to its original shape after 2secs of shrinking*/ - transition: transform.2s; +.memory-card:active { + /*Image shrinks to its 80%*/ + transform: scale(0.75); + /*Then comes back to its original shape after 2secs of shrinking*/ + transition: transform.2s; } .front-face, -.back-face{ - width: 185px; - height: 200px; - padding: 27px; - position: absolute; /*One image on top of the other*/ - border-radius: 5px; - /*To make the front-face image visible*/ - backface-visibility: hidden; +.back-face { + width: 185px; + height: 200px; + padding: 27px; + position: absolute; /*One image on top of the other*/ + border-radius: 5px; + /*To make the front-face image visible*/ + backface-visibility: hidden; } -.front-face{ - transform: rotateY(180deg); +.front-face { + transform: rotateY(180deg); } From 7da8e711f037f5589101dd3a056b651846cc8439 Mon Sep 17 00:00:00 2001 From: Shreyansh shrey Date: Sun, 15 Aug 2021 10:55:58 +0530 Subject: [PATCH 2/3] Fix : New joke button --- static/css/randomJoke.css | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/static/css/randomJoke.css b/static/css/randomJoke.css index 5644ae7..395eab0 100644 --- a/static/css/randomJoke.css +++ b/static/css/randomJoke.css @@ -35,7 +35,7 @@ body { border-radius: 10px; padding: 40px 30px; width: 700px; - height: 400px; + height: 420px; align-items: center; justify-items: center; text-align: center; @@ -53,12 +53,19 @@ h2 { padding: 20px 30px; } #joke { + position: absolute; + left: 7%; + top: 20%; font-size: 30px; line-height: 40px; margin: 50px 0; max-width: 600px; } .btn { + position: absolute; + left: 40%; + bottom: 0; + margin-bottom: 15px; background-color: white; color: #003b46; border: 0; From 0992348c5c36595976cdf5ec6660c113dd25d746 Mon Sep 17 00:00:00 2001 From: Shreyansh shrey Date: Tue, 17 Aug 2021 12:38:35 +0530 Subject: [PATCH 3/3] Fix: ping pong --- pingpong.html | 273 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 251 insertions(+), 22 deletions(-) diff --git a/pingpong.html b/pingpong.html index 13b47ab..c587c0f 100644 --- a/pingpong.html +++ b/pingpong.html @@ -1,27 +1,256 @@ - + + + - - - - PING PONG GAME - - - - - - - - - - - + PONG GAME - + + + + +
+
+
+
+
+
+

0

+

0

+

+ Press Enter to Play Pong
+ W and S for player 1
+ ⬆ and ⬇ for player 2 +

+
+ + +