Created
February 17, 2017 23:36
-
-
Save beck/41f4fc1694c831932f07283e32d2ec69 to your computer and use it in GitHub Desktop.
Simulating background-attachment fixed for iOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<style> | |
html { | |
background: url(http://i.imgur.com/vu9P5mN.jpg); | |
background-size: cover; | |
background-position: center; | |
} | |
.wrap { | |
height: 100vh; | |
overflow-y: auto; | |
} | |
p { | |
margin: 50px; | |
color: white; | |
font-family: sans-serif; | |
font-size: 5em; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="wrap"> | |
<p> | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce | |
dapibus egestas enim, ut finibus nunc. Ut ac neque euismod, euismod | |
orci nec, malesuada dui. Aenean semper tortor mi, sit amet ornare | |
arcu placerat suscipit. Nam id efficitur sem. Class aptent taciti | |
sociosqu ad litora torquent per conubia nostra, per inceptos | |
himenaeos. Curabitur augue mauris, auctor ultrices feugiat | |
sollicitudin, dictum in ipsum. Phasellus semper dolor urna, ut | |
sagittis justo egestas non. Suspendisse egestas velit sit amet ipsum | |
vestibulum imperdiet. | |
</p> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment