【问题标题】:How slowly fill color of a menu item? [closed]如何慢慢填充菜单项的颜色? [关闭]
【发布时间】:2013-08-07 01:20:47
【问题描述】:

在这个site 上,我喜欢菜单(右侧的-windows、-phone、-alm 等),但我不知道该怎么做。我不需要所有的实施。只需告诉我可以通过什么框架或库制作类似的菜单。我使用 asp .net mvc。

【问题讨论】:

    标签: c# javascript jquery menu


    【解决方案1】:

    您可以使用其他示例中提到的 CSS3 属性,但它们可能不适用于所有浏览器。您可以选择使用 jquery animate 方法来获得类似的效果。

     $("div").mouseenter(function(){
       $(this).css('background-color','red');
     $(this).animate({
     width:'250px'
     }, "slow");
     });
    
       $("div").mouseleave(function(){
       $(this).css('background-color','');
     $(this).animate({
     width:'50px'
     }, "slow");
     });
    

    见 jsfiddle http://jsfiddle.net/LCcLr/1/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-11
      • 2015-02-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多