简单修改选择文件样式

 1 <body>
 2         <style>
 3             #one {
 4                 display: inline-block;
 5                 width: 100px;
 6                 height: 100px;
 7                 position: relative;
 8                 overflow: hidden;
 9             }
10             
11             input {
12                 position: absolute;
13                 right: 0;
14                 top: 0;
15                 font-size: 100px;
16                 opacity: 0;
17                 filter: alpha(opacity=0);
18             }
19             
20             img {
21                 width: 100px;
22                 height: 100px;
23                 background: white;
24             }
25         </style>
26         <div id="one">
27             <img src="img/img2.png" alt="上传" id="imgDiv"/>
28             <input type="file" value="浏览" id="fileInput" />
29         </div>
30     </body>

 

posted @ 2017-07-26 16:33  幺丸  阅读(180)  评论(0编辑  收藏  举报