带时间显示功能的网页计算器,显示效果如图:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>calculator</title>
<style>
.form{
border: 2px solid gold;
background-color: burlywood;
width: 380px;
height: 450px;
border-radius: 20px;
text-align: center;
margin: auto;
}
.div1{
margin-top: 38px;
margin-bottom: 20px;
margin-left: 40px;
width: 300px;
height: 40px;
background-color:white;
text-align: left;
font-size: 35px;
line-height: 40px;
border-radius: 4px;
}
.time{
border: 1px solid darkkhaki;
width: 215px;
height: 45px;
font-size: 20px;
text-align: center;
border-radius: 4px;
background-color: palegoldenrod;
}
.button{
background-color: gold;
width: 70px;
height: 45px;
border-radius: 10px;
text-align: center;
font-size: 20px;
border: 1px solid darkkhaki;
}
</style>
</head>
<body>
<form class="form">
<div class="div1">
<span class="text" id="text">0