Created
April 1, 2021 01:59
-
-
Save nailtonpaixao/2f299627cbc7e27cf3b6b34b8de44771 to your computer and use it in GitHub Desktop.
Calculadora de Combustível
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
<html> | |
<head> | |
<title> | |
Imersão Dev - Aula 01 | |
</title> | |
</head> | |
<body> | |
<div class="container"> | |
<h1 class="page-title"> | |
ETANOL X GASOLINA | |
</h1> | |
<p class="page-subtitle"> | |
Descubra qual combustível compensa mais | |
</p> | |
<img src="https://www.alura.com.br/assets/img/imersoes/dev-2021/logo-imersao-conversor-de-moedas.svg" class="page-logo" alt=""> | |
</div> | |
<a href="https://alura.com.br/" target="_blank"> | |
<img src="https://www.alura.com.br/assets/img/home/alura-logo.svg" alt="" class="alura-logo"> | |
</a> | |
</body> | |
</html> |
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
var alcool = prompt ("Qual o valor do álcool ?") | |
alcool = parseFloat (alcool) | |
var gasolina = prompt ("Qual o valor da gasolina ?") | |
gasolina = parseFloat (gasolina) | |
var result = alcool/gasolina | |
if (result < 0.7) { | |
alert("Abasteça com álcool") | |
} else if (result > 0,7) { | |
alert("Abasteça com Gasolina") | |
} | |
//*REVISÃO* | |
//Variáveis = var - int - float - string | |
// alert - parseInt parseFloat | |
//Operações = somar, dividir, multiplicar, subtrair | |
//comentario final |
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
body { | |
font-family: 'Roboto Mono',monospace; | |
min-height: 400px; | |
background-image: url('https://images.pexels.com/photos/3602009/pexels-photo-3602009.jpeg?cs=srgb&dl=pexels-sergio-souza-3602009.jpg&fm=jpg'); | |
background-color: #000000; | |
background-size: 250vh; | |
background-position: center bottom; | |
background-repeat: no-repeat; | |
} | |
.container { | |
text-align: center; | |
padding: 20px; | |
height: 100vh; | |
} | |
.page-title { | |
color: #ffffff; | |
margin: 0 0 5px; | |
} | |
.page-subtitle { | |
color: #ffffff; | |
margin-top: 5px; | |
} | |
.page-logo { | |
width: 200px; | |
} | |
.alura-logo { | |
width: 40px; | |
position: absolute; | |
top: 10px; | |
right:10px; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment