gpt4 book ai didi

html - ionic ion-nav-title自定义内容错误显示

转载 作者:太空宇宙 更新时间:2023-11-04 11:38:11 25 4
gpt4 key购买 nike

我正在努力完成这个:

enter image description here

这是我的代码:

在 View 中,我将其添加到标题中:

<ion-nav-title>
<div class="progress">
<div class="active"><div>Selección</div></div>
<div><div>Destino</div></div>
<div><div>Pago</div></div>
</div>
</ion-nav-title>

我使用这个 CSS:

.bar {
height: 60px !important;
}
.has-header {
top: 60px !important;
}

.progress {
line-height: 4;
display: table;
table-layout: fixed;
width: 100%;
text-align: center;
}

.progress > div {
display: table-cell;
}

.progress > div > div {
color: #ddd;
border-top: 2px solid #ddd;
padding-left: 5px;
padding-right: 5px;
padding-top: 2px;
margin-left: 5px;
margin-right: 5px;
font-size: 50%;
text-transform: uppercase;
font-weight: normal;
}

.progress > div.active > div {
color: #fff;
border-top-color: #fff;
}

你可以在 codepen 中玩这个(请 fork):

http://codepen.io/anon/pen/NqLvMN

但是我明白了:

enter image description here

如果我将 .progress > div > div 显示更改为内联,我会得到:

enter image description here

求助!

最佳答案

根据第一张图片,我做了以下内容

CSS 更改

.progress > div {
display: inline-block; /* Horizontal alignment */
line-height: 15px; /* Vertical alignment */
width: 33%; /* Equal width 3 columns */
}

Updated Codepen

关于html - ionic ion-nav-title自定义内容错误显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31578142/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com