4 ms·
There is a difference between dispaly and visible in CSS. One just hides the element but doesn't rearrange the other elements around it, the other display as if
by 0df8dkdf 6y ago
There is a difference between dispaly and visible in CSS. One just hides the element but doesn't rearrange the other elements around it, the other display as if the element doesn't exist.
https://www.tutorialrepublic.com/css-tutorial/css-visibility.php https://www.tutorialrepublic.com/css-tutorial/css-visibility...
- bluedevil2k 6y agoI just learned something today, and I do CSS (amongst other things) for a living. Maybe it should be visible: true|false|ghost
- ivanhoe 6y agoSeriously, never had to deal with visibility:hidden before? To quote the Pythons: You lucky, lucky bastard....
- bluedevil2k 6y agoIt’s kind of unusual to set visibility to hidden in CSS, it’s more something you’d code in jQuery, or handle in the React code itself.
- ivanhoe 6y agoIf you've never before seen this hack consider yourself privileged to been born in a better world, without IE6 :P .clearfix:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }
- inopinatus 6y agoIn addition, visibility may participate in animations. In particular we can delay the transition of visibility to false, but not of display to hidden. So it is very helpful in some pure-CSS disappearance animations, such as fading out a modal's background overlay.