修改input的file按钮的外观

 我们用<input type="file" id="content"  /> 上传文件。

显示为:

  

但是有时候我们需要文本框的类型

以下解决方法:

<input type="button" value="请选择文件" onclick="content.click()" >  
<input type="file" id="content" style="display:none"  >

 css样式:

button
{
height: 60px;
width: 30%;
margin-left: 750px;
color: black;
font-size: 20px;
font-family:"黑体";
line-height: 50px;
padding-left: 555px;
}

 

posted @ 2019-03-05 15:37  经不起丶似水流年  阅读(594)  评论(0编辑  收藏  举报