<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
list-style: none;
}
body {
position: fixed;
top: 0;
left: 0;
height: 100%;
background-color: dodgerblue;
}
#calc {
position: fixed;
top : 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 400px;
height: 600px;
border: 1px solid #000;
padding: 20px;
background-color: aqua;
}
.output {
height: 80px;
line-height: 80px;
font-size: 40px;
margin-bottom: 20px;
font-weight: bold;
border: 1px solid #000;
}
ul {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
ul li {
text-align: center;
padding: 10px 0;
margin-bottom: 15px;
width : calc((100% - 45px) / 4);
border: 1px solid #000;
box-sizing: border-box;
}
</style>
</head>
<body>
<div id="calc">
<div class="output"></div>
<ul class="btns">
<li>7</li>
<li>8</li>
<li>9</li>
<li>/</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>*</li>
<li>1</li>
<li>2</li>
<li>3</li>
<li>-</li>
<li>0</li>
<li>.</li>
<li>=</li>
<li>+</li>
</ul>
</div>
<script src="js/jquery-3.6.0.min.js"></script>
<script>
$("#calc").on("click", function () {
});
</script>
</body>
</html>