求教CSS文字居中问题
本帖最后由 music_vip_2009 于 2012-12-08 00:10:26 编辑
<div class="listarticle">
<li>
<a href="#" target="_blank"><img src="http://preview.quanjing.com/rob_pre002/rob-728-4336.jpg" title="" alt="求教CSS文字居中有关问题"></a><br>
<a href="#" title="这里居中显示" target="_blank">这里居中显示</a>
</li>
</div>
<style>
.listarticle{margin-top:15px;}
.listarticle li { float:left; width:250px; line-height:40px; margin:0px 0px 0px 40px;}
.listarticle li img{padding:5px; width:220px; height:150px; border:solid 1px #ccc}
.listarticle li img:hover{border:solid 1px #87CEEB}
.listarticle li a{color:#383838;font-size:14px;font-weight: 500;}
.listarticle li a:hover {color:#3A5FCD;-moz-transition:color .2s ease-in;-webkit-transition:color .2s ease-in;-o-transition:color .2s ease-in;transition:color .2s ease-in;
}
</style>