<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>页码的制作</title> <style type="text/css"> .li { list-style-type:none; } .li a { font-family:"微软雅黑"; font-size:12px; border:1px solid #999999; margin-left:0 15px; padding:5px 10px; text-align:center; text-decoration:none; color:#000; font-weight:bold; margin:auto; } .li a:hover { color:#FFF; background-color:#F00; } </style> </head> <body> <!--在此制作页码的基本结构--> <div> <ul> <li class="li"> <a href="#">首页</a> <a href="#"><</a> <a href="#">1</a> <a href="#">2</a> <a href="#">3</a> <a href="#">···</a> <a href="#">></a> <a href="#">末页</a> </li> </ul> </div> </body> </html>
设置A标签的css:display:display:inline-block