From 0c46e9ab2f5c337b7f3fe139431421d74ab0d015 Mon Sep 17 00:00:00 2001 From: Yaroslav Petrov Date: Mon, 24 Apr 2023 16:29:22 +0300 Subject: [PATCH] add task solution --- readme.md | 6 ++-- src/index.html | 29 +++++++++++------- src/style.css | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+), 14 deletions(-) diff --git a/readme.md b/readme.md index 09d94e0d2..a970fe07a 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ # Boilerplate for layout tasks -Replace `` with your Github username and copy the links to Pull Request description: -- [DEMO LINK](https://.github.io/layout_snake/) -- [TEST REPORT LINK](https://.github.io/layout_snake/report/html_report/) +Replace `Yaroslav220890` with your Github username and copy the links to Pull Request description: +- [DEMO LINK](https://Yaroslav220890.github.io/layout_snake/) +- [TEST REPORT LINK](https://Yaroslav220890.github.io/layout_snake/report/html_report/) > Follow [this instructions](https://mate-academy.github.io/layout_task-guideline) diff --git a/src/index.html b/src/index.html index b20c6e96c..38c284131 100644 --- a/src/index.html +++ b/src/index.html @@ -1,14 +1,21 @@ - - - - - Snake - - - -

Snake

- + + + + + Snake + + + +
+
1
+
2
+
3
+
4
+
5
+
6
+
+ diff --git a/src/style.css b/src/style.css index e69de29bb..f38dae5c4 100644 --- a/src/style.css +++ b/src/style.css @@ -0,0 +1,82 @@ +html { + font-family: Arial, Helvetica, sans-serif; + font-size: 100px; + color: white; +} + +body { + margin: 0; +} + +.container { + display: flex; + flex-wrap: wrap; + width: 100%; +} + +.box { + display: flex; + justify-content: center; + align-items: center; + flex-basis: 33.33%; + flex-grow: 1; + width: 300px; + height: 300px; +} + +.box1 { + background-color: rgb(100%, 0%, 0%); +} + +.box2 { + background-color: rgb(80%, 0%, 0%); +} + +.box3 { + background-color: rgb(60%, 0%, 0%); +} + +.box4 { + background-color: rgb(40%, 0%, 0%); + order: 2; +} + +.box5 { + background-color: rgb(20%, 0%, 0%); + order: 1; +} + +.box6 { + background-color: rgb(0%, 0%, 0%); +} + +@media (max-width: 750px) { + .box { + flex-basis: 50%; + flex-direction: column-reverse; + } + + .box3 { + order: 1; + } + + .box4 { + order: 0; + } + + .box5 { + order: 2; + } + + .box6 { + order: 3; + } +} + +@media (max-width: 450px) { + .box { + flex-basis: 100%; + height: 300px; + order: 0; + } +}