• 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中,让元素隐藏(指屏幕范围内肉眼不可见)的方法很多,有的占据空间,有的不占据空间;有的可以响应点击,有的不能响应点击。

  • 相关阅读:
    在独立的文件里定义WPF资源
    Irrlicht 3D Engine 笔记系列 之 教程6- 2D Graphics
    Java实现二叉树的创建、递归/非递归遍历
    NDK在windows下的开发环境搭建及开发过程
    硬件路由转发原理浅析
    ubuntu下vim中内容拷贝到浏览器
    python调用Java代码,完毕JBPM工作流application
    C++组合通信
    linux杂谈(十八):DNSserver的配置(一)
    Codeforces 550D. Regular Bridge 构造
  • 原文地址:https://www.cnblogs.com/softwarefang/p/7092805.html
Copyright © 2020-2023  润新知