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标签下面去,所以让它自个跳上去。

相关文章:

  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2021-11-04
  • 2021-06-27
  • 2021-11-18
猜你喜欢
  • 2022-02-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
  • 2022-12-23
  • 2021-08-30
相关资源
相似解决方案