上传文件按钮美化,鼠标滑过变手型
<button class="btn-text"> 上传文件 <input type="file" id="upload" multiple="multiple" name="file"> </button>
.btn-text{ position:relative;-webkit-appearance:none; -moz-appearance:none; appearance:none;border:none;color:#1E90FF;background-color:transparent;overflow:hidden; -moz-user-select: none; -khtml-user-select: none; user-select: none;cursor:pointer}
.btn-text>input{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}
两个都设置了cursor:pointer无效
解决:设置input padding:20px;