Skip to content

Commit 32e45e8

Browse files
committed
Bugfix for hovering transition
1 parent 4010ae6 commit 32e45e8

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

stylesheet.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,32 @@ h2 {
113113
width: 160px;
114114
height: 160px;
115115
position: relative;
116+
overflow: hidden;
116117
}
117118

118119
.two {
119120
width: 160px;
120121
height: 160px;
121122
position: absolute;
123+
top: 0;
124+
left: 0;
122125
transition: opacity .2s ease-in-out;
123126
-moz-transition: opacity .2s ease-in-out;
124127
-webkit-transition: opacity .2s ease-in-out;
125128
}
126129

130+
.two img, .two video {
131+
width: 160px;
132+
height: 160px;
133+
object-fit: cover;
134+
}
135+
136+
.one > img {
137+
width: 160px;
138+
height: 160px;
139+
object-fit: cover;
140+
}
141+
127142
.fade {
128143
transition: opacity .2s ease-in-out;
129144
-moz-transition: opacity .2s ease-in-out;

0 commit comments

Comments
 (0)