img { width: 100px; } .main { width: 100%; margin: auto; } * { padding: 0; margin: 0; } .btn { padding: 9px 18px; background: #40AFFE; color: #FFFFFF; border-radius: 5px; } .upimg { position: relative; width: 100px; height: 100px; border-radius: 5px; border: dashed #999999; background: url(img/addimg.svg) no-repeat; background-position: 33px; } .upimg input { position: absolute; width: 100px; height: 100px; opacity: 0; } #showui { display: flex; justify-content: flex-start; } #showui li { width: 100px; height: 100px; position: relative; overflow: hidden; display: inline-block; margin-right: 5px; } #showui li img.showimg { position: absolute; text-align: center; /*top: 50%;*/ /*left: 50%;*/ /*transform: translate(-50%, -50%);*/ z-index: 6; } .showdiv { position: absolute; z-index: 9; bottom: 0; width: calc(100% - 10px); padding: 5px; display: flex; justify-content: space-around; background: rgba(0, 0, 0, .6); } .showdiv img { width: 16px; height: 16px; cursor: pointer; } #showui li:first-child img.left { opacity: .6; cursor: no-drop; } #showui li:last-child img.right { opacity: .6; cursor: no-drop; } .oneright { opacity: .6; cursor: no-drop !important; }