I. Grammatical structure of animate
Animate (Params,speed,callback)
Params: A mapping that contains style attributes and values, such as{key1:value1,key2:value2}
Speed: Speed parameter [optional]
Callback: Functions that are executed when the animation completes [optional]
Two, custom simple animation
Use a simple example to illustrate the effect of clicking a div across the page.
Definition and Usage:
The animate () method performs a custom animation of the CSS property set.This method changes the element from one state to another through a CSS style. CSS property values are gradually changed, so you can create animation effects.Only numeric values can create animations (such as "margin:30px"). String values cannot create animations (such as "background-color:red").Note: use ' + = ' or ' = ' to create a relative animation (re
(This article is reproduced from: http://www.cnblogs.com/royis/articles/2109254.html)
Animate (Params, options): A function used to create a custom animation.
The key to this function is to specify the animation form and result style attribute object. Each attribute in this object represents a changeable style attribute (such as "height", "TOP", or "opacity "). Note: All specified attributes must be in the form of camels. For example, marginleft must
Edge animate is a visual tool for Adobe's latest production of HTML5 animations, which can be easily understood as the HTML5 version of Flash Pro. In the following article, I will introduce the new HTML5 animation artifact.First, create Edge animation projectStart Edge Animate and create a new project.Set stage (stage) width to 640px and height to 1136px. Ctrl+s saved as demo.html. A standard edge
The function used to create the custom animation.return value: JQuery animate (params, [duration], [easing], [callback])If you are using a string value such as "Hide," "Show," or "toggle," the default animated form is called for the property. Paramsoptions a group of packagesContains a collection of style attributes and their values as animated and final valuesParams object {}, note: All specified properties must be in camel form, for example with Mar
It turned out to be good. Why don't you go ahead and write it down.
This version is basically the same as jquery's animate.
I mean, the effect is basically the same. (efficiency has not been tested.) );
If a professional tester helps me with the test.
1: Function description
Compatible with mainstream browsers.
1: Support callback function;
2: Support level linkage drawing call;
3: Support delay animation queue delay;
4: Support stop stop animation;
5
A page with a button that goes back to the top, click on the page will automatically return to the top of the page, you can use the way of hyperlinks, but the instant return to the top of the effect is not very ideal, the better effect is to scroll up for about 0.5 seconds, which requires the animation effect.
I chose to use jquery's animate () method, the top effect is perfect, but another effect is not ideal.
I want the height of the top button to d
This example describes the use of the Animate () method in jquery. Share to everyone for your reference. The specific analysis is as follows:
This method is used to create custom animations and to specify the length and erase effects of animations. You can also trigger a callback function when the animation is complete.
Use of the Animate () method:
Mode one:
defines the animation termination style prop
Yesterday, a user suddenly asked me if the animate () method can be used to operate all css attributes? Yes, I told him yes. However, you need to be aware of this. Next, I will use this article to introduce the css style attribute Summary based on jqueryanimatecss. If you are interested in jqueryanimatecss, I will study it together. Yesterday, a user suddenly asked me about animate () can I operate on all c
JQuery animate and CSS3 are combined to achieve slow-moving Chase Effect. Source Code download is provided. jquerycss3
Both CSS3 and jquery can achieve a slow chase effect. However, considering the compatibility of browsers, we recommend that you use the jquery animate method.
The following figure shows the implementation result:
Download demo source code
Reference file: jquery-1.11.1.min.js
Html
Jquery
v
Use the animation function animate of jQuery to implement the pea emission effect.
Let's take a look
Peas, lawns, and bullets are all ready-made images,
1. Is jQuery a library or framework?
JQuery is now the most popular js class library, rather than the framework.
Previously, I saw someone say this in zhihu:
You call library. Framework callyou.
I think that, literally, you can use a class library without constraints, but you need to use a framework
Example of animate () method usage in jQuery, jqueryanimate
This document describes how to use the animate () method in jQuery. Share it with you for your reference. The specific analysis is as follows:
This method is used to create a Custom Animation and specify the animation duration and erase effect. After the animation is completed, a callback function can be triggered.
Use of the
CSS3 and jquery can all implement ease chasing, but with browser compatibility, the jquery animate method is recommended. The implementation effect is as follows: Reference file: Jquery-1.11.1.min.js
Html
CodeJquery
var $first =$ (' #first ');var $second =$ (' #second ');(function () {Move1 ();Move2 ();})()function move1 () {$first. Animate ({"Left": 220,"Top": 0},400).
flexibility in animating frames, with different keyframe (animated frames) set up to achieve many elegant effects, The percentage in Keyframe is the percentage of total time the animation is completed. The animation is to set the overall animation effect, while the corresponding animation name is set in Keyframe, and then the specific animation effect is set in Keyframe. Of course, because it is a CSS3 attribute, you still need to be aware of its compatibility, plus the necessary prefixes.
jquery animations can have a lot of effect and support extended animations, where http://easings.net/zh-cn# has a very useful animation extension based on jquery, especially on some curves or parabolic lines where it is difficult to make ideal animations.The core idea of jquery animation is to divide the whole interval into n time period, and calculate the interval ratio value of the Moving (change) by the time animation relation function.This is a easings free drop animation curve, horizontal f
As you can see from the jquery API documentation, the jquery custom animation function. Animate (properties [, duration] [, easing] [, complete]) has four parameters:
Properties: a set of style attributes and their values that are included as animation properties and end values
Duration (optional): animation execution time, whose value can be one of three predetermined speeds ("slow", "normal", or "fast") or a millisecond value representing the leng
Yesterday, a netizen asked me animate () method can be used to manipulate all CSS properties? Yes, I told him it was OK. However, there is a need to pay attention to the need to be clear: when using animate (), you must use the Camel notation to write all the property names, for example, you must use Paddingleft instead of padding-left, use MarginRight instead Margin-right, wait.
Not all attributes in CSS
Animate (params, [duration], [easing], [callback])
A function to create a custom animation.
The key to this function is to specify the animation form and the result style Property object. Each property in this object represents a style attribute that can be changed (such as "height", "top", or "opacity"). Note: All specified attributes must be in camel form, such as marginleft instead of Margin-left.
The animation ends when the value of each property
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.