HTML5 implements functions similar to scratch cards, html5 implements scratch cards

Source: Internet
Author: User

HTML5 implements functions similar to scratch cards, html5 implements scratch cards
HTML5 implements functions similar to scratch cards

This feature allows us to omit 300 words when we use a public number to send images!

Note:

1. Set user Scaling: user-scalable = no | yes

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />

2. Drag prohibited:

Document. ontouchmove = function (e) {e. preventDefault () ;}; // The document disables the touchmove event.

3. Disable the pop-up menu:
document.documentElement.style.webkitTouchCallout = "none";

Specific implementation code:
<! DOCTYPE html> 

Preview:

Image material:









You can use html5 or js functions or css to save images in a specific box as images.

Cannot be implemented.
Window. location. href = "image/octet-stream" is only used to open the acquired image data in a new window, And the browser automatically prompts you to download the image.
But where does the image data come from? Canvas in HTML5 supports pixel-level operations to obtain image data. However, a webpage is rendered with a lot of DOM and styles instead of an image, in JS, it cannot be converted into an image, unless the browser provides related APIs, but currently there is no similar API provided by the browser, so it cannot be implemented for the time being.
You can see that all the current ones are either browser-based or plug-ins must be installed.

Can html5 achieve flash-like effects?

Yes. Here is a website: openrise.com/lab/PlasmaTree/ (if it cannot be opened for a higher browser version). You can see that the effect is very good and similar to that of flash. This should be the power of html5, I am also a beginner.

Accept

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.