Created
March 5, 2017 23:15
-
-
Save kyleturman/b52a12b49a29099d5a337360b4134c4a to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=b52a12b49a29099d5a337360b4134c4a
This file contains hidden or 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> | |
<title>Spot the Bug - March 6th</title> | |
</head> | |
<body> | |
<div class='hero'> | |
<h1 class='hero-title'>Hello!</h1> | |
</div> | |
<div> | |
<h1>Welcome to my website!</h1> | |
</div> | |
</body> | |
</html> |
This file contains hidden or 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
{"enabledLibraries":["jquery"]} |
This file contains hidden or 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
function changeHeroBackgroundColor(color) { | |
$('.hero').css('background-color', color); | |
} | |
$(document).ready(function() { | |
setTimeout(function(){ | |
// Changes the background color to blue | |
changeHeroBackgroundColor(); | |
},500); | |
}); |
This file contains hidden or 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
body { | |
text-align: center; | |
margin: 0; | |
} | |
.hero { | |
background-color: white; | |
color: white; | |
height: 300px; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
transition: background-color 0.3s ease-out; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment