Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Lin-Yuying authored Jan 18, 2025
1 parent 8a08f10 commit a2a0971
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a2a0971

Please sign in to comment.