ionic2:如何设置图像上方的图像不透明度?

阿尔希玛·阿德尔

我正在使用 Ionic2 并且我想制作图像并在单击图像时在图像上方设置一个图标我将上传图像:这是我的代码:

img {
  -o-object-fit: cover;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0.6;
}
<img src="http://cdn.business2community.com/wp-content/uploads/2014/04/profile-picture.jpg"/><br/>
        <button clear id="chgImg">Change Image</button><br/>

我想设置:

<ion-icon name="camera"></ion-icon>

在图像上方和中心,我该怎么办?

信息传输率

将容器添加到图像和按钮

.container{
     position: relative;
 }

在容器内添加图标并将其位置设置为绝对。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章