jquery如何添加图片右上角删除图标 5
html代码:
<body>
<div class="row">
<div class="col-xs-3" >
<img class="img-square" src="../img/122.png">
<div class="closeLayer" onClick="delcfm( )" href="#" id="huajiao">
<img src="../img/close.png">
</div>
</div>
<div class="col-xs-3" >
<img class="img-square" src="../img/122.png">
<div class="closeLayer" onClick="delcfm( )">
<img src="../img/close.png">
</div>
</div>
</div>
</body>
css代码:
.img-square{
/*border: 1px solid red;*/
margin-left: 30px;
margin-top: 10px;
}
.closeLayer{
/*display: none;*/
z-index: 99;
position:absolute; /*绝对定位*/
left:270px; /*位置自己看着调整,在图片上方*/
top:5px;
/*border: 1px solid red;*/
}
类似这样的效果,至于删除的具体操作jquery自己写咯