当前位置: 代码迷 >> Web前端 >> 暗藏 input file
  详细解决方案

暗藏 input file

热度:642   发布时间:2012-07-02 17:46:22.0
隐藏 input file

<style type="text/css">
??? .myclass{
??????? filter:alpha(opacity=0); //IE 下透明
??????? opacity:0;? //火狐下透明
?? ?}
</style>

?

?

<div? style="width: 100px; height: 29px; background: url(&quot;/uular/images/default/addp.png&quot;) no-repeat scroll right center transparent; display: inline; position: absolute; overflow: hidden;">
??? ????????????????????? ??? <input type="file" class="myclass"? style="position: relative; height: 25px; width: 130px; display: inline; cursor: pointer;? margin-left: -40px;" id="albumPhotoSource" name="albumPhoto" onchange="showImage(this);"></input>
??? ????????????????????? </div>

  相关解决方案