zoukankan      html  css  js  c++  java
  • 文件上传按钮input[type="file"]按钮美化时在IE8中的bug【兼容至IE8】

    首先看一下完成后的效果,鼠标移入可改变为手指的效果。

    在此就不加图标了

    <label class="file-upload">
      <span>上传附件</span>
      <input type="file" name="">
    </label>
    

      在IE8中需要将input透明后还不能完全达到效果,还需要将字体设大一些,撑开input,这是IE自带的兼容问题。

    .file-upload{
    	display: inline-block;
    	 120px;
    	height: 36px;
    	line-height: 36px;
    	text-align: center;
    	color: #fff;
    	position: relative;
    	overflow: hidden;
    	background:#3AA1F5;
    	margin-left: 15px;
    }
    .file-upload input{
    	position: absolute;
    	left: 0;
    	top: 0;
    	z-index: 10;
    	opacity: 0;
    	filter:Alpha(opacity=0);
    	color: transparent;
    	 100%;
    	height: 100%;
    	cursor: pointer;
    	font-size: 100px;
    	background:transparent;
    }
    .file-upload span{
    	margin: 0 5px;
    	font-size: 12px;
    }
    

      

  • 相关阅读:
    第一个java程序和注释
    hadoop map端join
    hadoop wordcount入门
    hadoop reduce端联结
    hadoop streaming的使用
    HDU5752 Sqrt Bo
    L2-008 manacher 的应用
    L3-001 凑零钱
    L2-001 紧急救援
    如何在ubuntu下安装go开发环境
  • 原文地址:https://www.cnblogs.com/pomelott/p/7400554.html
Copyright © 2011-2022 走看看