Last active
May 30, 2018 18:19
-
-
Save diggeddy/eeb0fb894b1b94be27daf29bee6bfbe7 to your computer and use it in GitHub Desktop.
Adds a zoom effect to background image
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
<script type="text/javascript"> | |
window.onload = function() { | |
var pageHeader = document.querySelectorAll(".generate-content-header"); | |
pageHeader[0].classList.add("zoom"); | |
} | |
</script> | |
.generate-content-header { | |
background-size: 100%; | |
transition: background-size 2s ease-in; | |
-webkit-backface-visibility: hidden; | |
backface-visibility: hidden; | |
} | |
.generate-content-header.zoom { | |
background-size: 110%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment