Skip to content

Instantly share code, notes, and snippets.

@yang-wei
Last active June 6, 2024 06:56
Show Gist options
  • Save yang-wei/9114967 to your computer and use it in GitHub Desktop.
Save yang-wei/9114967 to your computer and use it in GitHub Desktop.
Full size background image using CSS cover in mobile devices
html {
background: url(image url) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
height: 100%;
overflow: hidden;
}
@gpc91
Copy link

gpc91 commented Aug 13, 2021

Fantastic, thank you.

@josuedrivera
Copy link

love u =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment