点击输入框和上传按钮都打开任务管理器(兼容IE和火狐):
HTML:
<div class="row"> <input type="text" class="popjoin-input popjoin-fileinput" readonly="readonly" /> <a href="javascript:void(0)" class="popjoin-upload">上传</a> <input type="file" class="popjoin-file" /> </div>
CSS:
.row{ position: relative; } .popjoin-input{ background: #FFFFFF; border: 1px solid #D7D7D7; height: 24px; padding: 6px 9px; width: 550px; color: #666666; outline: none; float: left; } .popjoin-fileinput{ width: 450px; } .popjoin-upload{ width: 90px; height: 38px; line-height: 38px; text-align: center; background: #666A82; border-radius: 5px; color: #FFFFFF; font-size: 16px; float: right; } .popjoin-upload:hover{ background: #76798F; text-decoration: none; } .popjoin-filerow{ overflow: hidden; } .popjoin-file{ position: absolute; left: 0; width: 570px; top: 0; height: 38px; font-size/*\**/:570px\9;/*IE*/ filter: alpha(opacity=0); opacity: 0; cursor: pointer; overflow: hidden; }
时间: 2024-11-13 10:52:40