【发布时间】:2016-04-11 15:03:36
【问题描述】:
我正在制作具有缩放/滚动(xy)的简单图像视图。但我无法通过使用 ion-scroll 获得正确的结果。对不起,我是离子新手。 这是我的 .js 代码部分和类。
JS
<ion-content class="bg-color detail-cont">
<ion-scroll class="filter-image" zooming="true" direction="xy" min-zoom="1" locked="false" has-bouncing="true">
<div class="my-image" style="background: url('{{ getCurPhotoURI() }}')"></div>
</ion-scroll>
</ion-content>
CSS
.filter-image {
height:100% !important;
width: 100% !important;
background-color: black;
}
.my-image{
width: 100% !important;
height: 100% !important;
background-size: contain !important;
background-repeat: no-repeat !important;
background-position: center, center !important;
}
怎么了? 谢谢你的提前。 问候。
【问题讨论】:
标签: javascript css angularjs ionic-framework