我正在编写一个井字游戏,并且无法将我的游戏牌垂直堆叠成3×3盒子.
就目前而言,它们是连续9个水平方框,但是当我使用{clear:left;}它只是将它们变成9个垂直方框.
到目前为止,这是我的代码:
#div1 {
width: 80px;
height: 80px;
padding: 10px;
border: 1px solid #aaaaaa;
float:left;
}
#div2 {
width: 80px;
height: 80px;
padding: 10px;
border: 1px solid #aaaaaa;
float:left;
}
#div3 {
width: 80px;
height: 80px;
padding: 10px;
border: 1px solid #aaaaaa;
float:left;
}
Drag the X and O images into the tic-tac-toe board: