代码之家  ›  专栏  ›  技术社区  ›  user90150

如何在html中使用list或anchor元素进行修复?

  •  1
  • user90150  · 技术社区  · 16 年前

    我有列表和锚链接网站。

    我想把锚的长度固定好,这样它就不会到达下一条线。

    当我把鼠标移到上面时,剩下的文本应该被显示出来,当鼠标移到链接外面时,它应该再次被设置回正常的一行。

    我想要绿色的那个。

    alt text

    3 回复  |  直到 9 年前
        1
  •  1
  •   Jitendra Vyas    16 年前

    http://jsbin.com/etete3/2

    在FF 3.6 IE 8和7中测试

    html格式

    <a href="#" id="hello">Hello World, how are you, where is peace</a>
    
    <a href="#" id="hello2">Hello World, how are you, where is peace</a>
    

    css格式

    a {background:yellow;width:150px;display:block;height:20px;overflow:hidden}
    
    a:hover {background:pink;display:block;overflow:visible;height:auto;}
    

        2
  •  0
  •   Matchu    16 年前

    用这个怎么样 height auto 悬停。

        3
  •  0
  •   Siva    16 年前