From df874571b4479d3815ca416b03c090534bc573a4 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Thu, 8 Jul 2021 00:56:46 +0300 Subject: [PATCH] js flex --- JavaScript/GameLoop/index.html | 4 +++- JavaScript/GameLoop/styles.css | 12 +++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/JavaScript/GameLoop/index.html b/JavaScript/GameLoop/index.html index ad89205..b73797a 100644 --- a/JavaScript/GameLoop/index.html +++ b/JavaScript/GameLoop/index.html @@ -6,7 +6,9 @@ - +
+ +
diff --git a/JavaScript/GameLoop/styles.css b/JavaScript/GameLoop/styles.css index bf6ba6b..60d661c 100644 --- a/JavaScript/GameLoop/styles.css +++ b/JavaScript/GameLoop/styles.css @@ -1,10 +1,20 @@ +html { height: 100%; } + body { background-color: #101024; padding: 0; margin: 0; + height: 100%; +} + +div.wrap { + display: flex; + height: 100%; + align-items: center; + justify-content: center; } canvas#game { - margin: 0 auto; + border: 2px solid #ec8a4b; display: block; }