ul li内的文字水平居中显示

head>
<style rel="stylesheet" type="text/css" >
#top{height:140px;}
#top ul{text-align:center;list-style-type:none;}
#top ul li{display:inline;list-style-type:none;}
</style>
</head>

 <body>
    <div id="top">        
    <ul><li><a href="#">文本居中</a></li>
    <li><a href="#">文本居中</a></li>
    <li><a href="#">文本居中</a></li>
    </ul></div>

</body>

 

posted @ 2015-07-16 16:43  乐少007  阅读(5788)  评论(0编辑  收藏  举报