├── script.js ├── index.html └── style.css /script.js: -------------------------------------------------------------------------------- 1 | var numeroSecreto = 5; 2 | 3 | while(chute != numeroSecreto) { 4 | var chute = prompt('Digite um número entre 0 e 1000') 5 | //se o chute for igual ao número secreto 6 | if (chute == numeroSecreto) { 7 | alert('Acertou!') 8 | } else if (chute > numeroSecreto) { 9 | alert('Errou... o número secreto é menor') 10 | } else if (chute < numeroSecreto) { 11 | alert('Errou... o número secreto é maior') 12 | } 13 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodePen - _Mentalista - Projeto 6 | 7 | 8 | 9 | 10 |
11 |

12 | Mentalista 13 |

14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: "Roboto Mono", monospace; 3 | text-align: center; 4 | background-image: url("https://caelum-online-public.s3.amazonaws.com/assets-imersaodev/background_mentalista.png"); 5 | background-color: #000000; 6 | background-size: cover; 7 | background-position: center top; 8 | background-repeat: no-repeat; 9 | height: 100vh; 10 | } 11 | 12 | .container { 13 | text-align: center; 14 | padding: 20px; 15 | } 16 | 17 | .page-title { 18 | color: #ffffff; 19 | margin: 0 0 5px; 20 | } 21 | 22 | .page-subtitle { 23 | color: #ffffff; 24 | margin-top: 5px; 25 | } 26 | 27 | .page-logo { 28 | width: 200px; 29 | } 30 | 31 | .alura-logo { 32 | width: 40px; 33 | position: absolute; 34 | top: 10px; 35 | right: 10px; 36 | } 37 | 38 | body > img { 39 | margin: 0 10px; 40 | } 41 | 42 | img { 43 | max-height: 350px; 44 | } --------------------------------------------------------------------------------