zoukankan      html  css  js  c++  java
  • CSS元素隐藏

    { display: none; /* 不占据空间,无法点击 */ } 
    
    /********************************************************************************/ 
    
    { visibility: hidden; /* 占据空间,无法点击 */ } 
    
    /********************************************************************************/ 
    
    { position: absolute; top: -999em; /* 不占据空间,无法点击 */ } 
    
    /********************************************************************************/ 
    
    { position: relative; top: -999em; /* 占据空间,无法点击 */ } 
    
    /********************************************************************************/ 
    
    { position: absolute; visibility: hidden; /* 不占据空间,无法点击 */ } 
    
    /********************************************************************************/ 
    
    { height: 0; overflow: hidden; /* 不占据空间,无法点击 */ } 
    
    /********************************************************************************/ 
    
    { opacity: 0; filter:Alpha(opacity=0); /* 占据空间,可以点击 */ } 
    
    /********************************************************************************/ 
    
    { position: absolute; opacity: 0; filter:Alpha(opacity=0); /* 不占据空间,可以点击 */ } 
    
    /********************************************************************************/ 
    
    { 
    zoom: 0.001; 
    -moz-transform: scale(0); 
    -webkit-transform: scale(0); 
    -o-transform: scale(0); 
    transform: scale(0); 
    /* IE6/IE7/IE9不占据空间,IE8/FireFox/Chrome/Opera占据空间。都无法点击 */ 
    } 
    
    /********************************************************************************/ 
    
    { 
    position: absolute; 
    zoom: 0.001; 
    -moz-transform: scale(0); 
    -webkit-transform: scale(0); 
    -o-transform: scale(0); 
    transform: scale(0); 
    /* 不占据空间,无法点击 */ 
    } 

     在CSS中,让元素隐藏(指屏幕范围内肉眼不可见)的方法很多,有的占据空间,有的不占据空间;有的可以响应点击,有的不能响应点击。

  • 相关阅读:
    c++<ctime>中常用函数
    头文件<cmath>中常用函数
    c++动态数组的使用
    迭代器与指针
    引用和指针做形参时的区别
    c++使用cin、cout与c中使用scanf、printf进行输入输出的效率问题
    c++指定输出小数的精度
    Linux命令学习(1)
    Nginx 配置文件nginx.conf中文详解
    Walle实现自动发布
  • 原文地址:https://www.cnblogs.com/softwarefang/p/7092805.html
Copyright © 2011-2022 走看看