input file自定义按钮美化

input file自定义按钮美化
复制代码
代码如下:

.fileInputContainer{
height:256px;
background:url(/d/jc/20230411/lbvmo44xrud40.webp);
position:relative;
width: 256px;
}
.fileInput{
height:256px;
overflow: hidden;
font-size: 300px;
position:absolute;
right:0;
top:0;
opacity: 0;
filter:alpha(opacity=0);
cursor:pointer;
}

 

 

复制代码
代码如下:

<div class="fileInputContainer">
<input class="fileInput" type="file" name="" id="" />
</div>

DEMO:

推荐阅读