先上样式
<!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;}
table{
width:1000px;
border:collapse;
margin:100px auto 0;
}
table td{
border:1px solid #930;
}
table tr td{
width:250;
height:100px;
text-align:center;
}
table tr.title td{
height:50px;
background:#c36;
color:#fff;
font-weight:bold;
font-size:14px;
}
table tr td img{
width:100px;
}
table tr td.number span{
display:inline-block;
font-size:14px;
text-align:center;
}
table tr td.number span.down,
table tr td.number span.add{
width:30px;
height:30px;
background:pink;
font-weight:bold;
font-size:14px;
line-height:30px;
cursor:pointer;
}
table tr td.number span.num{
width:50px;
height:30px;
line-height:30px;
border-top:1px solid #ddd;
border-bottom: