<!DOCTYPE?html>
<html>
<head>
<meta?http-equiv="Content-Type"?content="text/html;?charset=gb2312"?/>
<title>頁(yè)碼的制作</title>
<style>
/*在此定義相關(guān)CSS樣式*/
.top{?width:295px;?height:30px;?border:1px?solid?#ccc;?}
.top?.to{?font-size:12px;?border:1px?solid?#ccc;display:block;?width:40px;?height:20px;line-height:20px;text-align:center;float:left;margin:4px?5px;}
.top?.tol{?font-size:12px;?border:1px?solid?#ccc;display:block;?width:20px;?height:20px;line-height:20px;text-align:center;float:left;margin:4px?5px;}
.top?.tol{?font-size:12px;?border:1px?solid?#ccc;display:block;?width:20px;?height:20px;line-height:20px;text-align:center;float:left;margin:4px?5px;}
.top?.tol?p{?margin:0px;?background:red;}
</style>
</head>
<body>
<!--在此制作頁(yè)碼的基本結(jié)構(gòu)-->
<div?class="top">
?<span?class="to">首頁(yè)</span>
?<span?class="tol"><</span>
?<span?class="tol"><p>1</p></span>
?<span?class="tol">2</span>
?<span?class="tol">3</span>
?<span?class="tol">....</span>
?<span?class="tol">></span>
?<span?class="to">末頁(yè)</span>
</div>
</body>
</html>
2015-12-25
不要用display:block;用display:inline-block;就會(huì)在同一行了