Skip to content

Instantly share code, notes, and snippets.

@apermo
Created January 10, 2020 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apermo/3b25f0ea7432efb0b2ccc4ec9a140935 to your computer and use it in GitHub Desktop.
Save apermo/3b25f0ea7432efb0b2ccc4ec9a140935 to your computer and use it in GitHub Desktop.
A fix for the ios fixed&cover background issue
body::after {
content: "";
display: block;
position: fixed;
top: 0;
left: 0;
height: 100%;
height: 100vh;
width: 100%;
width: 100vw;
background: #cccccc;
background-size: cover;
background-position: center center;
background-image: url( http://path.to/wp-content/uploads/2017/11/file.jpg );
z-index: -1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment