Home Tags About

CSS: "visibility" vs. "display"

31 Aug 2012
css
  • 改变 visibility 隐藏后仍然占据空间:

      $('#a').css({visibility, "visible"});
      $('#a').css({visibility, "hidden"});
    
  • 改变 display 才是真正的隐藏:

      $('#a').show();
      $('#a').hide();