javascript - I want to make a canvas touch drawing board, but the screen will roll around while drawing. How to stop it?
PHP中文网
PHP中文网 2017-06-30 09:56:11
0
2
800

touchmove insidee.prevetDefualtdoesn’t work

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
Ty80

The drawing board is too big and the phone is too small
This is the default event of the phone and cannot be stopped

仅有的幸福

Be careful that the width and height of the canvas do not overflow the html. The width and height set by the body and the size of the canvas must be appropriate. In addition, the body is set to overflow:hidden and no scroll bars appear; then disable the touchmove event;

    document.ontouchmove = function (e) {
        e.preventDefault();
        return false;
    }
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template