file 标签上传文件,更改样式


jsp:

<input  class="file_img" type="file" multiple="multiple" id="file0"name="file0" style="padding: 0px"> 

<input style="padding: 0px ;background-image:url('<%=basePath%>img/game/0.png'); " type="button" value="点击替换图片" onclick="file0.click()"></input>



<style>
 .tx1_c img{
 max-height:303px;
 max-width:303px;}
 .div_file_btn {
position: relative;
padding-bottom: 68px;
}
.div_file_btn input {
color: #666;
font-family: "SimSun";
margin: 0;
outline: none;
padding: 0;
}
.file_btn {
background: none;
border: none;
background: url('/${res}/bbs_member/images/haniu_btn1.png') 0 0;
background-repeat: no-repeat;
height: 38px;
line-height: 38px;
text-align: center;
width: 130px;
}
.file_btn:hover{
background:url('/${res}/bbs_member/images/haniu_btn1.png') 0 -76px;
}


.file_img {
height: 38px;
opacity: 0;
filter: alpha(opacity=0);
font-size: 30px;
position: absolute;
left: 0;
top: 0;
width: 130px;
}
 </style>

猜你喜欢

转载自blog.csdn.net/boywcx/article/details/78535292