CSS 如何让li横向居中显示
<!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
- 上一篇:鼠标指向文字时,显示图片
- 下一篇:在css文件里,导入多个css文件
