Article Introduction: CSS Web Design tips: Hide the page elements of the method rollup. |
In CSS, let the elements hidden (refers to the screen within the scope of the naked eye) a lot of methods, some occupy space, some do not occupy space, some can respond to clicks, some can't respond to clicks. Listed below, choose one that suits you.
{display:none/* does not occupy space, cannot click * *}
{visibility:hidden/* Occupy space, cannot click * *}
{Position:absolute Top: -999em/* Does not occupy the space, cannot click * *}
{position:relative Top: -999em/* Occupy space, unable to click */}
{position:absolute; Visibility:hidden/* Does not occupy space, cannot click * *}
{height:0; Overflow:hidden/* Does not occupy space, cannot click * *}
{opacity:0; Filter:alpha (opacity=0);/* occupy space, you can click */}
{position:absolute; opacity:0 filter:alpha (opacity=0);/* Do not occupy space, you can click * *}
{
zoom:0.001;
-moz-transform:scale (0);
-webkit-transform:scale (0);
-o-transform:scale (0);
Transform:scale (0);
* * IE6/IE7/IE9 not occupy space, ie8/firefox/chrome/opera occupy space. Can not click *
}
{
Position:absolute;
zoom:0.001;
-moz-transform:scale (0);
-webkit-transform:scale (0);
-o-transform:scale (0);
Transform:scale (0);
/* Do not occupy space, can not click * *
}