js上传图片预览教程
程序员文章站
2023-08-18 21:13:15
js 上传图片预览
css
.gjimg li{
float:left;
width:265px;
margin-left:100px;
height:...
js 上传图片预览
.gjimg li{ float:left; width:265px; margin-left:100px; height:283px; overflow:hidden; } .gjimg li span{ font-size:14px; color:#000; margin-left:65px; cursor:pointer; } .gjimg li .afile{ width:230px; height: 230px; line-height: 230px; position: relative; cursor: pointer; color: #000; font-size:16px; text-align:center; background: #e5e5e5; border: 1px solid #d4d4d4; border-radius: 1px; overflow: hidden; display: inline-block; *display: inline; *zoom: 1 } .gjimg li .afile input{ position: absolute; font-size: 100px; right: 0; top: 0; opacity: 0; filter: alpha(opacity=0); cursor: pointer; width:230px; height: 230px; } #xmtanimg{ width:232px; height:232px; position:relative; top:-232px;display:none; }
if (typeof filereader == 'undefined') { document.getelementbyid("xmtandiv").innerhtml = "