相关疑难解决方法(0)

ipad safari:禁用滚动和弹跳效果?

我正在开发一个基于浏览器的应用程序,目前我正在为ipad safari浏览器开发和设计样式.

我在ipad上寻找两件事:如何禁用不需要它的页面的垂直滚动?如何禁用弹性反弹效果?

scroll mobile-safari bounce ipad

119
推荐指数
6
解决办法
19万
查看次数

如何让这个HTML5 Canvas绘图应用程序适用于触摸和鼠标事件?

这是我正在尝试做的源代码:

http://jsfiddle.net/3nGtM/

使用Javascript:

    window.addEventListener('load', function () {
    // get the canvas element and its context
    var canvas = document.getElementById('sketchpad');
    var context = canvas.getContext('2d');

    // create a drawer which tracks touch movements
    var drawer = {
        isDrawing: false,
        touchstart: function (coors) {
            context.beginPath();
            context.moveTo(coors.x, coors.y);
            this.isDrawing = true;
        },
        touchmove: function (coors) {
            if (this.isDrawing) {
                context.lineTo(coors.x, coors.y);
                context.stroke();
            }
        },
        touchend: function (coors) {
            if (this.isDrawing) {
                this.touchmove(coors);
                this.isDrawing = false;
            }
        }
    };
    // create a function to pass …
Run Code Online (Sandbox Code Playgroud)

javascript html5 android html5-canvas

4
推荐指数
1
解决办法
4343
查看次数