效果图
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/0a86f049415605f5097a3afe95e53f2c.png)
程序较短,为方便使用,html,css,js,写在了一起,很多东西写着才添加
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>篮球计时计分器</title>
<style>
#parent{
position: relative;
}
#parent div{
border: 1px solid black;
color: black;
display: inline-block;
text-align: center;
}
div:hover{
cursor: pointer;
}
#parent .big{
height: 500px;
width: 300px;
font-size: 240px;
line-height: 500px;
background-color: yellow;
}
#minute{
position: absolute;
top:50px;
left: 400px;
border-radius: 50px 0 0 0;
}
#second{
position: absolute;
top:50px;
left: 700px;
}
#parent .middle{
height: 250px;
width: 250px;
font-size: 200px;
line-height: 250px;
position: absolute;
top: 300px;
left: 1001px;
background-color: yellow;
}
#parent .small{
height: 95px;
width: 136.5px;
font-size: 27px;
line-height: 100px;
background-color: grey;
}
#parent .contain{
position: absolute;
top: 554px;
left: 400px;
}
#parent #start{
background-color: yellow;
}
.score{
width: 300px;
height: 560px;
border: 1px solid black;
position: absolute;
top: 100px;
overflow: hidden;
}
.team{
height: 100px;
overflow: hidden;
border: 1px solid black;
border-radius: 3px 3px 0 0;
}
.team input{
height: 100px;
width: 300px;
font-size: 50px;
text-align: center;
}
#score1{
left: 105px;
}
#score2{
left: 1262px;
}
.score11{
width: 300px;
height: 360px;
background-color: purple;
color: white;
font-size: 180px;
text-align: center;
line-height: 360px;
}
.add{
width: 53px;
height: 98px;
display: inline-block;
border: 1px solid black;
background-color: yellow;
color: black;
font-size: 25px;
text-align: center;
line-height: 98px;
}
.less