Home >Web Front-end >H5 Tutorial >Detailed introduction to animation forms

Detailed introduction to animation forms

零下一度
零下一度Original
2017-06-11 15:03:501853browse

The main knowledge used in this article This article mainly uses the drawImage method in the Canvas API. This method is briefly introduced below. To draw images in the Canvas API, use the drawImage method, which is an overloaded method defined as follows: context.drawImage(image,x,y); context.drawImage(image,x,y,w,h); context.drawImage(image,sx,sy,sw,sh,dx,dy,dw,dh); The first method has three parameters. The first parameter is the image to be drawn (it can also be a video element), x and y is the starting coordinate of the image in the canvas. The second method has five parameters. The first three have the same meaning as the first method. w and h refer to the width and height of the image when drawing, which can be used for image scaling. The third method has nine parameters. The first parameter has the same meaning as the first two methods. The first four of the last eight parameters take a rectangle on the source image, and the last four parameters are used to define a rectangle on the canvas. The function of the whole method is

1. HTML5 Programming Practice Part 2 - Using animation to switch image code case

Detailed introduction to animation forms

Introduction: This article mainly uses the drawImage method in the Canvas API. This method is briefly introduced below. To draw an image in the Canvas API, use the drawImage method. This is an overloaded method, defined as follows:

2. jquery animate picture mode sliding sample code_jquery

Detailed introduction to animation forms

Introduction: jquery animate() is a function used to create custom animations. The key to this function is to specify the animation form and result style attribute objects.

3. Jquery custom animation overview and examples_jquery

Introduction: animate is used to create custom animations function. The key to this function is to specify the animation form and result style attribute object. Next, I will introduce how to use it. Interested friends can refer to

4. Introduction to the use of jQuery animation animate method_jquery

Introduction: Function used to create custom animations. The key to this function is to specify the animation form and result style attribute object. The following is a detailed introduction to the specific use of the animate method. Interested friends can learn more

The above is the detailed content of Detailed introduction to animation forms. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn