box2怎么在box1中居中
用css样式即可
#box2 {
width:100px;
height:100px;
position: absolute;
top: 25%;
left: 25%;
}
width: 100px;
height: 100px;
left: 50%;
top: 50%;
margin-left:-50px;
margin-top: -50px;
text-align:center;