想了解免费建站的朋友,查看《免费建站教程》

CSS 如何让li横向居中显示

2020-03-31 1309 建站
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>


<style>
.dede_pages {text-align:center;}
.dede_pages ul {display:table;margin-left:auto;margin-right:auto;}
.dede_pages ul li{float:left;float:none;display:inline;zoom:1;}
.dede_pages ul li a{margin:5px;}
</style>
<div class="dede_pages ">
  <ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
  </ul>
</div>


</body>
</html>


版权保护: 转载请保留链接: https://cgy.isi8.cn/jianzhan/121.html