两种实现标题右侧更多的例子:
HTML

<h2><a href="#" >标题</a> <a href="#">更多…</a></h2>
位置法
h2{
position
:relative;
height
:30px;
}
span
{
position
:absolute;
right
:0;
top
:0;
display
:block;
height
:30px;
}
浮动法
h2{
height
:30px;
}
span
{
float
:right;
display
:block;
margin
:-15px 0 0 0;
height
:30px;
}
这里因为float会换行到h2标签的下面,利用margin-top 的负数将浮动层上移
原文网址:http://www.greencss.com/article.asp?id=100
原文网址:http://www.greencss.com/article.asp?id=100

相关文章:

  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2022-01-02
猜你喜欢
  • 2022-02-20
  • 2021-10-10
  • 2021-11-04
  • 2022-12-23
  • 2021-07-23
  • 2021-07-12
  • 2021-08-28
相关资源
相似解决方案