From 2ab411af9401b21f079d60e50a6aa3863f8d9b21 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Thu, 31 Oct 2024 14:51:27 +0100 Subject: [PATCH] add task solution --- src/images/Star.png | Bin 0 -> 384 bytes src/images/star-active.png | Bin 0 -> 337 bytes src/index.html | 44 ++++++++++++++++++++++++++++++++++++- src/style.css | 27 ++++++++++++++++++++++- 4 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 src/images/Star.png create mode 100644 src/images/star-active.png diff --git a/src/images/Star.png b/src/images/Star.png new file mode 100644 index 0000000000000000000000000000000000000000..2efb7fd4dc0ed7190a9421037da8b26d50b05762 GIT binary patch literal 384 zcmV-`0e}99P)BiMx9V#YSiUlFV!DTBwdJ`k-+}3> enl-m^RoDX3R#Svf7#2YQ0000}Rl8<3oNC%zs?aTa()7Bet#3xhBt!>l*8o|0J>k`OiFE978G?rv~2UZE_H>Iq`Q=25S&gS%c^T zQ4h|D#Hy%@%yH z?15a)@j|)S>u($OroZUet=ij`^gD8vk)O@^P;2+x6TUM9XNNJyD+k@oUT5a}cys52 zIr3NIgde@QKY{0f`m5jnmh^l-W`D~4xNhMjm3c=3ceh;R`T8n9IrjRNr%vl0PCJ-* gMgCAmn@mf*+Ruf1f1f<{80cdLPgg&ebxsLQ0D_u^i2wiq literal 0 HcmV?d00001 diff --git a/src/index.html b/src/index.html index 3e4d7e8ab0..e2fbad7976 100644 --- a/src/index.html +++ b/src/index.html @@ -12,7 +12,49 @@ href="./style.css" /> + -

Stars

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/style.css b/src/style.css index a63fa10d43..9e7000de09 100644 --- a/src/style.css +++ b/src/style.css @@ -1 +1,26 @@ -/* add styles here */ +body { + margin: 0; +} + +.stars { + display: flex; +} + +.stars__star { + width: 16px; + height: 16px; + margin-right: 4px; + + background-image: url(./images/star.svg); + background-repeat: no-repeat; + background-position: center; +} + +.stars--0 .stars__star:nth-child(-n), +.stars--1 .stars__star:nth-child(-n + 1), +.stars--2 .stars__star:nth-child(-n + 2), +.stars--3 .stars__star:nth-child(-n + 3), +.stars--4 .stars__star:nth-child(-n + 4), +.stars--5 .stars__star:nth-child(-n + 5) { + background-image: url(./images/star-active.svg); +}