0
所以我想要一个小图标放在图像的左上角,但是当我写top:0和left:0时,图标放置在整个页面的左上角,所以我必须一直向上滚动才能看到它。位置绝对元素是页面的孩子,而不是位置相对元素
这是图片的CSS:
.attimage {
width: 50%;
border-radius: 5%;
float: left;
margin-right: .5em;
position: relative;
}
这是图标的CSS:
.location-icon {
width: 15px;
left: 0px;
top: 0px;
position: absolute;
}