Typescript 如何在爱奥尼亚卡中添加谷歌地图?
我试图将谷歌地图添加到爱奥尼亚卡中,但地图没有显示出来。如果地图不在离子卡中,它就会显示出来。你能帮忙吗 HTML:Typescript 如何在爱奥尼亚卡中添加谷歌地图?,typescript,ionic-framework,Typescript,Ionic Framework,我试图将谷歌地图添加到爱奥尼亚卡中,但地图没有显示出来。如果地图不在离子卡中,它就会显示出来。你能帮忙吗 HTML: 你能试试这个吗 <ion-card class="transparent-card"> <div #map id="gmap" style="height:100px;"></div> </ion-card> .transparent-card{ background-color: transparent;
你能试试这个吗
<ion-card class="transparent-card">
<div #map id="gmap" style="height:100px;"></div>
</ion-card>
.transparent-card{
background-color: transparent;
}
ion-card {
position: relative;
text-align: left;
}
.card-title {
position: absolute;
top: 36%;
font-size: 2.0em;
width: 100%;
font-weight: bold;
color: #fff;
}
.card-subtitle {
font-size: 1.0em;
position: absolute;
top: 52%;
width: 100%;
color: #fff;
}
.transparent-card{
background-color: transparent;
}
#map{
height: 100%;
width: 100%;
}
<ion-card class="transparent-card">
<div #map id="gmap" style="height:100px;"></div>
</ion-card>
.transparent-card{
background-color: transparent;
}