Skip to content

Instantly share code, notes, and snippets.

@agustinpfs
Last active May 13, 2020 19:27
Show Gist options
  • Save agustinpfs/420c2ebc9ffa350c8e024ae69cce7a52 to your computer and use it in GitHub Desktop.
Save agustinpfs/420c2ebc9ffa350c8e024ae69cce7a52 to your computer and use it in GitHub Desktop.
add styles
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body {
background: url("https://blog.selfbank.es/wp-content/uploads/2018/07/iStock-889946406-720x320.jpg") no-repeat center center fixed;
background-size: cover;
}
main {
width: max-content;
margin-left: auto;
margin-right: auto;
text-align: center;
}
h1 {
color: green;
}
</style>
</head>
<body>
<main>
<h1 id="titulo">HOLA MUNDO!</h1>
<button onclick="cambiaColor('rojo')">ROJO</button>
<button onclick="cambiaColor('amarillo')">AMARILLO</button>
</main>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment