ionic cordova popover 组件中的 Img 不显示
Img in ionic cordova popover component does not show
我希望当用户按下应用中的按钮时,会打开一个弹出窗口。此弹出窗口显示几个圆形过滤器选项 (pictures infront of an invisible checkbox ),这些选项在按下时会发生变化。像这样:
问题是我无法在 ionic cordova 的 popover 组件中看到 img,而 popover 元素在其他方面工作正常。在离子中真的可以做到这一点吗?
这是我的代码片段:
<div class="filter-buttons">
<div class="metal">
<input type="checkbox">
<label>test</label>
<img src="heavy.jpg" alt="stuff" height="42" width="42">
</div>
我也在 css 中尝试将它作为背景:
.metal{
background-image: url("heavy3.jpg");
}
你应该将图片放在 www/assets
中并添加此代码
background: url(../assets/heavy3.jpg) no-repeat;
background-size: 100% 100%;
我希望当用户按下应用中的按钮时,会打开一个弹出窗口。此弹出窗口显示几个圆形过滤器选项 (pictures infront of an invisible checkbox ),这些选项在按下时会发生变化。像这样:
问题是我无法在 ionic cordova 的 popover 组件中看到 img,而 popover 元素在其他方面工作正常。在离子中真的可以做到这一点吗?
这是我的代码片段:
<div class="filter-buttons">
<div class="metal">
<input type="checkbox">
<label>test</label>
<img src="heavy.jpg" alt="stuff" height="42" width="42">
</div>
我也在 css 中尝试将它作为背景:
.metal{
background-image: url("heavy3.jpg");
}
你应该将图片放在 www/assets
中并添加此代码
background: url(../assets/heavy3.jpg) no-repeat;
background-size: 100% 100%;