Styling an input type=“file” button

后端 未结 30 1644
终归单人心
终归单人心 2020-11-21 11:50

How do you style an input type=\"file\" button?

30条回答
  •  清酒与你
    2020-11-21 11:51

    css can do a lot here... with a little trickery...

    #wrapper { width: 93px; /*play with this value */ height: 28px; /*play with this value */ background: url('browseBtn.png') 0 0 no-repeat; border:none; overflow:hidden; } #browse{ margin-left:-145px; /*play with this value */ opacity:0; /* set to .5 or something so you can better position it as an overlay then back to zero again after you're done */ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); }

    ::reference::http://site-o-matic.net/?viewpost=19

    -abbey

提交回复
热议问题