我是Ionic的新手。我正在尝试为this.这样的简介页创建离子卡。基本上,我想在离子卡顶部使用离子化身,如image.如何在离子卡上添加离子化身?像下面的图片
我该怎么做?
下面是代码:
#content {
position: relative;
// margin-top: auto;
background-color: green;
box-shadow: 0px -1px 10px rgba(0, 0, 0, 0.4);
padding-top: 200px;
}
#profile-info {
position: absolute;
top: -95px;
width: 100%;
z-index: 2;
text-align: center;
}
#profile-image {
display: block;
border-radius: 120px;
border: 1px solid #fff;
width: 128px;
height: 128px;
margin: 30px auto 0;
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.7);
}
<ion-content has-header="true">
<ion-card id="content">
<ion-avatar id="profile-info">
<img id="profile-image" src="img/bg.jpg">
</ion-avatar>
</ion-card>
</ion-content>
显示一些代码,到目前为止你做了什么? –
@ GabrielBarreto编辑了这个问题。增加了代码。到目前为止,我能够获得离子卡上的头像,但只有一半,但不是全面的。 – JBhatt