LAYUI上传多张或者单张图片增加 左右移动及删除

浏览:7025 发布日期:2018/07/06 分类:功能实现 关键字: php layui
LAYUI2.0上传多张图片增加 左右移动及删除功能,同时支持单张上传。
HTML部分:
<button type="button" class="layui-btn layui-btn-primary" id="upload_img">上传图片</button>
<div id="upload_img_list"> </div>
CSS部分:
#upload_img_list {
    margin: 10px 0 0 0
}
#upload_img_list dd {
    position: relative;
    margin: 0 10px 10px 0;
    float: left
}
#upload_img_list .operate {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1
}
#upload_img_list .operate i {
    cursor: pointer;
    background: #2F4056;
    padding: 2px;
    line-height: 15px;
    text-align: center;
    color: #fff;
    margin-left: 1px;
    float: left;
    filter: alpha(opacity=80);
    -moz-opacity: .8;
    -khtml-opacity: .8;
    opacity: .8
}
#upload_img_list dd .img {
    max-height: 150px;
    max-width: 500px
}
完整代码包 js html php 下载 :

https://u17832525.ctfile.com/fs/17832525-297427018
评论( 相关
后面还有条评论,点击查看>>