emlog侧边栏添加新浪图床上传代码


使用方法


把以下代码添加到侧边栏中即可

<div class="zz-list lh200 p10">
    <style type="text/css">
#file{position:absolute;z-index:1;cursor:pointer;opacity:0;}
#file,.btn_mouseout{background:#6F8EC5;color:#FFF;display:block;line-height:37px;text-align:center;width:100%;}
#sinaimg{width:50%;padding-bottom: 25px;}
#sinaimgurl{background: rgba(255, 0, 0, 0);padding: 5px;line-height: 31px;border: 1px solid #ddd;width: 286px;color: #999;border-radius: 4px;}
#img{text-align: center;width: 100%}
.upload-drag{
  position: relative;
  padding: 30px;
  border: 1px dashed #e2e2e2;
  background-color: #fff;
  text-align: center;
  cursor: pointer;
  color: #999;
}
</style>
<script type="text/javascript" src="//www.qqssu.com/content/templates/zanblog3/ui/js/m.js"></script>
<script type="text/javascript" src="//www.qqssu.com/content/templates/zanblog3/ui/js/x.js"></script>
<form id="form1">
  <div class="upload-drag" id="upload-drag" onclick="file.click()" title="点击上传图片">
    <img src="https://ww2.sinaimg.cn/large/843dc74bgy1fpkedpgq3tj201c01c0of.jpg">
<p id="stat">点击上传</p>
    <input type="file" id="file" name="file" onchange="sc();" style="display:none" accept="image/*">  
  </div>
</form>
<div id="img"></div>
<div id="imgurl"></div>
<script type="text/javascript" src="//www.qqssu.com/content/templates/zanblog3/ui/js/b.js"></script>  </div>

欢迎留言