今天又写页面了,给图片加一个关闭按钮,顺手记录下。外div绝对定位,内部图片用相对定位。
.MainDiv {
width:100%;
}
.MainDiv .LiDiv {
text-align:center;
width:100px;
height:100px;
padding:5px;
border:1px;
float:left;
cursor:pointer;
}
.MainDiv .LiDiv .UpImg {
width:100px;
text-align:center;
height:80px;
position:relative;
}
.MainDiv .LiDiv .DownTxt {
width:100px;
text-align:center;
height:20px;
}
.MainDiv .LiDiv .delImg {
width:20px;
height:20px;
position:absolute;
right: -5px;
top: -5px;
}
合同
最后效果: