离子捏放大图像
Ionic pinch to zoom in image
我只是想在离子视图中放置图像,使其全宽,并允许缩放/缩放缩放事件。看起来很简单,但我能做到!!我是新来的。有人能帮帮我吗?
这就是我想要的,但无法实现我想要的:
<ion-view view-title="MAP">
<ion-content>
<ion-scroll zooming="true" direction="xy" delegate-handle="zoom-pane" class="zoom-pane" scrollbar-x="false" scrollbar-y="false">
<img ng-src="img/map.png">
</ion-scroll>
</ion-content>
</ion-view>
只需在ion-scroll中添加overflow-scroll="false"属性
HTML <ion-scroll id="mapImage"
zooming="true"
direction="xy"
delegate-handle="zoom-pane"
class="zoom-pane"
min-zoom="1"
max-zoom="15"
overflow-scroll="false">
<img ng-src="img/map.png">
</ion-scroll>
CSS .zoom-pane {
width: 100% !important;
height: 100% !important;
}
.zoom-pane .scroll {
min-height: 100% !important;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-direction: normal;
-moz-box-direction: normal;
-webkit-box-orient: horizontal;
-moz-box-orient: horizontal;
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
-webkit-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
-webkit-box-pack: center;
-moz-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-align-content: stretch;
-ms-flex-line-pack: stretch;
align-content: stretch;
-webkit-box-align: center;
-moz-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
}
.zoom-pane img {
width: 100% !important;
vertical-align: top !important;
}
相关文章:
- UIAutomation放大图像
- 如何使用javascript onmouseover缓慢放大图像
- 鼠标悬停时如何居中放大背景图像
- 查找仅适用于原始图像的图像放大算法的名称
- 使用angular缩放大图像以适应屏幕宽度
- 当我使用JS/jQuery/any插件点击图像时,我如何使背景变暗+不可点击,并放大和居中我的图像
- 使用 JavaScript 在我的 html 页面中放大图像
- 加载、滚动、放大和缩小图像,如谷歌地图
- 我想滚动放大和缩小一个图像,但也有针在该图像上保持正确的位置.jQuery
- 悬停时放大图像,但不要'不要把容器放大
- 在放大/缩小图像的同时平移图像上的圆
- JavaScript 和 HTML5 中的图像放大
- 仅使用一个图像放大图像
- 图像放大/缩小无法正确定位图像
- 在JS中的图像放大收缩动画
- 当图像放大时添加滚动条
- 实现图像放大/收缩效果
- 图像放大脚本
- 如何在没有固定大小的情况下将图像放大效果添加到块中
- Javascript图像放大问题