From a2a09718437779bd396aff507893f9db7cc267e9 Mon Sep 17 00:00:00 2001 From: Lin-Yuying <61513895+Lin-Yuying@users.noreply.github.com> Date: Fri, 17 Jan 2025 23:49:35 -0800 Subject: [PATCH] Update index.html --- index.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index c4fe34f..797668e 100644 --- a/index.html +++ b/index.html @@ -57,13 +57,16 @@ .mydiv { width: 150px; - aspect-ratio: 1 / 1; + padding-top: 150px; /* Maintain a 1:1 aspect ratio */ border-radius: 50%; overflow: hidden; - margin-right: 0px; + position: relative; /* Required for absolutely positioned children */ } - + .mydiv img { + position: absolute; + top: 0; + left: 0; width: 100%; height: 100%; object-fit: cover;