CSS实现标题右侧“更多”

HTML

< h2>< a h ref="#" >标题< /a> < span>更多…< /span> < /h2>

CSS

h2{
height:20px;
}
span{
float:right;
display:block;
margin:-10px 0 0 0;
height:20px;
}

其实只是利用了margin-top 的负数来实现,因为默认的float会换行到h2标签下面去,所以让它自个跳上去。

posted @ 2013-11-06 20:43  leejersey  阅读(1091)  评论(0编辑  收藏  举报