Last active
June 24, 2019 13:05
-
-
Save smlparry/0e6e94b430d2326c93a4a76a41c11304 to your computer and use it in GitHub Desktop.
css-parallax-1
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
# CSS | |
.container { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
border: 1px solid black; | |
height: 200px; | |
width: 200px; | |
perspective: 8px; | |
perspective-origin: 50%; | |
} | |
.element { | |
height: 100px; | |
width: 100px; | |
background: red; | |
} | |
# Markup | |
<div class="container"> | |
<div class="element"></div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment