Created
August 8, 2017 21:41
-
-
Save prof3ssorSt3v3/98c93160cc0535e21e7c9f3d2d46bd5f to your computer and use it in GitHub Desktop.
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Tha Internetz</title> | |
<meta name="viewport" content="width=device-width"> | |
<style> | |
*{ | |
padding: 0; | |
margin: 0; | |
box-sizing: border-box; | |
} | |
h1{ | |
margin: 2rem; | |
} | |
#container{ | |
margin: 2rem; | |
display:flex; | |
flex-flow: row wrap; | |
height: 402px; | |
width: 602px; | |
border: 1px solid #333; | |
} | |
.hour{ | |
width:100px; | |
height: 100px; | |
padding: 10px; | |
border: 1px solid #333; | |
font-size: 3.6rem; | |
position: relative; | |
} | |
.hour span{ | |
position: absolute; | |
bottom: 0; | |
right: 0; | |
left: 0; | |
color: #AAA; | |
font-size: 1.0rem; | |
text-align: center; | |
} | |
.precip{ | |
background-color: hsl(200, 50%, 80%); | |
color: hsl(200, 50%, 40%); | |
} | |
.hot{ | |
background-color: gold; | |
font-weight: bold; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>Forecast for the Next 24 Hours</h1> | |
<main id="container"> | |
</main> | |
<script src="./real-world.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As it says in the error message, all fetch calls must be done over http(s). You can't load a script over file:/// with fetch.
You must run the script through a web server.