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 a2a0971 commit 04bcd54
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,19 @@

.mydiv {
width: 150px;
padding-top: 150px; /* Maintain a 1:1 aspect ratio */
aspect-ratio: 1 / 1;
border-radius: 50%;
overflow: hidden;
position: relative; /* Required for absolutely positioned children */
margin-right: 0px;
}

.mydiv img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center top;
}

h3 {
text-align: left;
font-size: 18px;
Expand Down

0 comments on commit 04bcd54

Please sign in to comment.