Create Wonderful Glassmophism (Transparent) Calculator by this Source Code

Ticker

10/recent/ticker-posts

Create Wonderful Glassmophism (Transparent) Calculator by this Source Code

Get Transparent Calculator by Programming


HTML Code-

<!DOCTYPE html>

<html lang="en">

<head>

    <link rel="stylesheet" href="style.css">

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Glassmorphism Calculator</title>

</head>

<body>

    <div class="calc-body">

        <input type="text" name="" id="inp" readonly>

        <table>

            <tr>

                <td>(</td>

                <td>)</td>

                <td>C</td>

                <td>/</td>

            </tr>

            <tr>

                <td>7</td>

                <td>8</td>

                <td>9</td>

                <td>+</td>

            </tr>

            <tr>

                <td>4</td>

                <td>5</td>

                <td>6</td>

                <td>*</td>

            </tr>

            <tr>

                <td>1</td>

                <td>2</td>

                <td>3</td>

                <td>-</td>

            </tr>

            <tr>

                <td class="zero">0</td>

                <td>.</td>

                <td>%</td>

                <td class="equal">=</td>

            </tr>

        </table>

    </div>

</body>

<script>

    let screen=document.getElementById('inp');

    let buttons=document.querySelectorAll('td');

    let screenValue='';

    for(item of buttons){

        item.addEventListener('click', (e)=>{

            buttonText=e.target.innerText;

            if(buttonText=="C"){

                screenValue="";

                screen.value=screenValue;

            }

            else if(buttonText=="="){

                screen.value=eval(screenValue);

            }

            else{

                screenValue+=buttonText;

                screen.value=screenValue;

            }

        });

    }

</script>

</html>


CSS Code-

*

{

    font-family: Swis721 BlkOul BT;

color: yellow;

    user-select: none;

    margin: 0;

    padding: 0;

    box-sizing: border-box;

    text-decoration: none;

}

body

{

    justify-content: center;

    align-items: center;

    display: flex;

    min-height: 100vh;

    background: url(https://wallpaperaccess.com/full/17927.jpg);

}

.calc-body

{

    height: 75.5vh;

    width: 24vw;

    background: radial-gradient(at 100% 50%, rgba(0, 0, 100, 0.05), rgba(255, 255, 255, 0.5));

    border-radius: 20px;

}

input

{

    font-size: 45px;

    color: aqua;

    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;

    height: 100px;

    width: 21vw;

    border: none;

    outline: none;

    background: transparent;

}

table

{

    justify-content: center;

    align-items: center;

    display: flex;

}

td

{

    cursor: pointer;

    font-size: 30px;

    text-align: center;

    height: 70px;

    width: 70px;

border-top: 2px solid rgba(192, 192, 192, 0.2);

    border-right: 2px solid rgba(192, 192, 192, 0.2);

    border-bottom: 2px solid rgba(192, 192, 192, 0.2);

border-left: 2px solid rgba(192, 192, 192, 0.2);

}

td:hover

{

    background-color: rgb(55, 0, 179);

}

.zero

{

    border-bottom-left-radius: 15px;

}

.equal

{

    border-bottom-right-radius: 15px;

}


Transparent Calculator OUTPUT



Post a Comment

31 Comments

  1. Wonderful 😊😊

    ReplyDelete
  2. Perfect 👌 👌 👌 👌

    ReplyDelete
  3. 👌 👌 👌 👌 👌 👌

    ReplyDelete
  4. 👌 👌 👌 👌 👌 👌

    ReplyDelete