gpt4 book ai didi

html - 将图标移动到导航标题的右侧

转载 作者:行者123 更新时间:2023-11-28 07:43:13 25 4
gpt4 key购买 nike

我想创建一个带有侧边菜单和导航标题中标题的应用程序。在导航标题的右侧,我会放置一个图标。

这是我当前的代码:

<ion-view>
<ion-nav-title align-title="center">
<h1 class="title">Title</h1>
<img src="./img/MyIcon.ico" height="40px" width="auto">
</ion-nav-title>
<ion-content>
...
</ion-content>
</ion-view>

此时标题和图标都居中。

有没有办法将图标放在右侧?

最佳答案

您可以从 </icon-nav-title> 中取出图像行(居中),或将图像向右浮动:

<img src="./img/MyIcon.ico" height="40px" width="auto" style="float:right">

您可能还想尝试为此创建一个 CSS。

关于html - 将图标移动到导航标题的右侧,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30849370/

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