Skip to content

MarceloAL3/Calculadora

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

<title>Calculadora</title> <style> *{ margin: 0; padding: 0; }
    .fundo{
        background-image: linear-gradient(45deg,black,blue);
        height: 100vh;
        color: white;
        font-family: Arial, Helvetica, sans-serif;
        text-align: center;
    }
    .calculadora{
        position: absolute;
        background-color: rgba(0, 0, 0.8);
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        border-radius: 15px;
        padding: 15px;
    }
    .botao{
        width: 50px;
        height: 50px;
        font-size: 25px;
        cursor: pointer;
        margin: 3px;
        background-color: rgb(31,31,31);
        border: none;
        color: #fff;
    }
    .botao:hover{
        background-color: black;
    }
    #resultado{
        background-color: white;
        width: 207px;
        height: 30px;
        margin: 5px;
        font-size: 25px;
        color: black;
        text-align: right;
        padding: 5px;
    }
</style>

Marcelo Lima

Calculadora

C < / x
7 8 9 -
4 5 6 +
1 2 3 =
0 .
<script> function insert(num) { var numero = document.getElementById('resultado').innerHTML; document.getElementById('resultado').innerHTML = numero + num; } function clean() { document.getElementById('resultado').innerHTML = ""; } function back() { var resultado = document.getElementById('resultado').innerHTML; document.getElementById('resultado').innerHTML = resultado.substring(0, resultado.length -1); } function calcular() { var resultado = document.getElementById('resultado').innerHTML; if(resultado) { document.getElementById('resultado').innerHTML = eval(resultado); } else { document.getElementById('resultado').innerHTML = "Nada..." } } </script>

About

Cálculos Básicos.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages