From bf930516929ef9b5b4d54d9889b890893d2b19a3 Mon Sep 17 00:00:00 2001 From: Zina Pirozhkova Date: Wed, 16 Oct 2024 11:59:19 +0300 Subject: [PATCH] add task stars --- src/index.html | 48 +++++++++++++++++++++++++++++++++++++++++++++++- src/style.css | 30 +++++++++++++++++++++++++++++- 2 files changed, 76 insertions(+), 2 deletions(-) diff --git a/src/index.html b/src/index.html index 3e4d7e8ab0..d804e687f7 100644 --- a/src/index.html +++ b/src/index.html @@ -13,6 +13,52 @@ /> -

Stars

+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + + +
diff --git a/src/style.css b/src/style.css index a63fa10d43..6fc75b0448 100644 --- a/src/style.css +++ b/src/style.css @@ -1 +1,29 @@ -/* 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__star:last-child { + margin-right: 0; +} + +.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); +}