怎么设置,让数字处于方格的正中央
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>内联块状元素</title>
<style type="text/css">
a,span{
display:inline-block;
width:50px;/*在默认情况下宽度不起作用*/
height:50px;/*在默认情况下高度不起作用*/
background:pink;/*设置背景颜色为粉色*/
text-align:center; /*设置文本居中显示*/
}
</style>
</head>
<body>
<a>1</a>
<a>2</a>
<a>3</a>
<a>4</a><br/>
<span style="color:blue;background:yellow">5</span>
<span style="color:blue;background:yellow">6</span>
<span style="color:blue;background:yellow">7</span>
<span style="color:blue;background:yellow">8</span>
</body>
</html>