我喜欢添加一个与 div 标签重叠的 div 标签,并在重叠的 div 标签上添加一个文本。这是代码。. 请帮忙。
.center_prod_box{
border-radius: 15px;
width:190px;
height: 260px;
float:left;
text-align:center;
padding:0px 0px 5px; 0;
margin:0px 5px 0px 0;
border:1px #000000 solid;
}
.product_title{
background:#cdf895;
border-radius: 15px;
textalign:center;
font-size:12px;
margin: 7px 5px;
font-weight:bold;
color:#ffffff;
padding:5px 5px 5px 15px;
}
<div class="center_prod_box">
<img src="images/offer2.png" style="position:absolute; margin-left:50px; margin-top:-10px;" alt="" border="0" width="60" height="60" Title="Amul Butter" />
<div class="offertext" style=" position:absolute; margin-left:0px;">Hello</div>
<a href="" Title="Amul Butter">Amul Butter</a>
</div>