From a35bdd6edb8f3bc1952a575d41a6de17ccd6d997 Mon Sep 17 00:00:00 2001 From: QuentinN42 Date: Sun, 1 May 2022 14:57:11 +0200 Subject: [PATCH] feat: working images background Signed-off-by: QuentinN42 --- builder/files/main.css | 36 ++++++++++++++++++++++++++---------- builder/templates/index.html | 19 ++++++++----------- 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/builder/files/main.css b/builder/files/main.css index 3bcc271..6820839 100644 --- a/builder/files/main.css +++ b/builder/files/main.css @@ -2,33 +2,44 @@ display: block; width: 150px; height: 150px; - padding: 10px; + overflow: hidden; } .item { display: relative; background-size: cover !important; - color: white; + color: black; text-decoration: none; + overflow: hidden; +} + +.item:hover { + color: black; +} + +.item img { + width: 100%; + height: 100%; + object-fit: contain; } .item h2 { - text-align: center + text-align: center; } .item .desc { - background: black; + background: rgba(0,100,100,0.75); width: 100%; height: 100%; - opacity: 0; - transition-property: opacity; - transition-duration: 0.5s; - transition-timing-function: linear; - border-radius: 5px; + transition-property: transform; + transition-duration: 0.2s; + transition-timing-function: linear; + border-radius: 5px; + overflow: hidden; } .item:hover .desc { - opacity: 0.4; + transform: translate(0,-100%); } @@ -41,3 +52,8 @@ h2 { display: flex; flex-wrap: wrap; } + +.flex-item { + padding: 10px; + margin: 0%; +} diff --git a/builder/templates/index.html b/builder/templates/index.html index b302000..1769bfd 100644 --- a/builder/templates/index.html +++ b/builder/templates/index.html @@ -18,17 +18,14 @@