html - ionic css 问题,同时将右下角的 ionic 图标设置为图像

标签 html css ionic2 ionic3

我想在我的 ionic 应用中实现以下布局

enter image description here

下面是我的代码

html代码

<div class="common_padding">
<ion-item text-center class="imagebg" no-padding (click)="openCameraActionSheet()">
  <img class="circle-pic" src="{{client.logo}}" style="height: 100px; width: 100px" />
  <ion-icon name="star" item-right></ion-icon>

</ion-item>

CSS代码

page-profile {

  .imagebg{
      background: map-get($colors,primary);
      color: map-get($colors,whiteColor);
  }
  .common_padding{
    padding: 0;


   }
   .circle-pic{
      width:50px;
    height:50px;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    }

 }

当我运行上面的代码时,我得到如下输出

enter image description here

它显示在 View 的右端我需要它靠近图像任何想法我该如何解决这个问题?

最佳答案

html文件

<div class="common_padding">
<ion-item text-center class="imagebg" no-padding (click)="openCameraActionSheet()">
  <div class="profile-image">
  <img class="circle-pic" src="{{client.logo}}" style="height: 100px; width: 100px" />
  <ion-icon name="star" item-right></ion-icon>
  </div>
</ion-item>
</div>

CSS文件

 .profile-image{
         margin:0px auto;
    }

我希望它对你有用。

关于html - ionic css 问题,同时将右下角的 ionic 图标设置为图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46299585/

相关文章:

javascript - IONIC 2 : How to upload a . docx,远程服务器上的图像文件以及文件到 mysql 数据库的链接

angular - 如何在 ionic 3 中包含 JS 文件

html - HTML5 视频元素中 mp4 之前或之后的 webm?

html - :target 的形状转换

php - javascript 函数调用不起作用

css - 在菜单后面或后台发布内容

javascript - 重新格式化 json 数据中的字符

css - 仅在 Firefox 中出现奇怪的 HTML 间距

html - 如何将 css 添加到 ionic 2 组件模板

javascript - 事件监听器被意外附加