Skip to content

Commit f38cd1c

Browse files
bloyceybsmthpepelsbey
authored
Fix | Prevent scrollbars on ViewTransitions MPA example (#296)
* Make img a block element * Use % instead of vw/vh --------- Co-authored-by: Brian Smith <brian@smith.berlin> Co-authored-by: Vadim Makeev <hi@pepelsbey.dev>
1 parent 71e56e4 commit f38cd1c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

view-transitions/mpa/styles.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ body {
1111
}
1212

1313
img {
14-
width: 100vw;
15-
height: 100vh;
14+
display: block;
15+
width: 100%;
16+
height: 100%;
1617
object-fit: cover;
1718
}
1819

0 commit comments

Comments
 (0)