<h4>기존버튼</h4> <input type="file"> <hr/> <h4>IE8 이하</h4> <span class="btn btn-default btn-file"> 파일추가 <input type="file"> </span> <hr/> <h4>IE9 이상</h4> <label class="btn btn-primary btn-file"> 파일추가 <input type="file" style="display: none;"> </label>
.btn-file { position: relative; overflow: hidden; } .btn-file input[type=file] { position: absolute; top: 0; right: 0; min-width: 100%; min-height: 100%; font-size: 100px; text-align: right; filter: alpha(opacity=0); opacity: 0; outline: none; background: white; cursor: inherit; display: block; }