<style type="text/css">
.myclass{
filter:alpha(opacity=0); //IE 下透明
opacity:0; //火狐下透明
}
</style>
<div style="width: 100px; height: 29px; background: url("/uular/images/default/addp.png") 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>
本文介绍了一种使用CSS和HTML相结合的方法来实现文件输入框的视觉隐藏效果,同时保持其交互功能完整。通过设置特定样式,如透明度和背景图片,可以使得文件选择控件在网页中不可见但仍然可用。
1万+

被折叠的 条评论
为什么被折叠?



