With CSS3, you can animate Web page elements with styles without using JavaScript and flash, making your site even more cool.
CSS3 Transition
The over-animation (Trainsition) property allows for the excessive styling of elements, trainsition supported browsers are Ie10,firefox,chrome and opera.
Let's take a look at several properties of Trainsition:
Trainsition-property: A CSS property name that specifies the transition to apply.
Trainsition-duratio
());ElseElement = this. item;Element. animate ({left: 1, top: 1 },{Duration: element. data ("Duration "),Step: CircleAnimation. fn. caculateNextPoint});},CaculateNextPoint:Function (){Var el;El = $ ("#" + This. id. toString ());Var sin = el. data ("currentPoint"). y/el. data ("r ");Var angle = Math. asin (sin );If (el. data ("currentPoint"). x Angle = Math. PI-angle;// Caculate the angle diff between current point angle and next point angleVar angled
Recently wrote HTML5+CSS3 page found jquery unable to operate transform: rotation and other effects so I wrote a simpleJS Native simple Implementation animate Operation Css3 Property
Set the Transform property of the View object to achieve a variety of animation effects.1, moveIn the same plane, the control translates a certain distance in a straight line direction.
12345
//每次都从当前位置平移self.imageView.transform = CGAffineTransformTranslate(self.imageView.transform, -2.1, -2.1)//每次都从最开始的位置计算平移self.imageView.transform = CGAffineTransformMakeTranslation(2.3, 2.3)
2, rotate
12345678
//连续旋转UIView.beginAnimations(nil, context: nil)UIVi
overall style needs to modify the DD CSSModify the following (the title div height and the label's div height are the same, then you can only drag the label to control the position, it will not affect the following text box)DivID= "DD"style= "background: #ECF0F4; width:105px;height:300px;"> DivID= "title"style= "height:20px;"> labelstyle= "height:20px">Draglabel> inputtype= "text"style= "width:100px;"/> Div>Div>after modificationWhen you set the Echarts data to empty, it dis
Chrome animation Mechanism
Animation first needs to create a container for Time Scheduling. Here is the animation container.
This class uses base: repeatingtimer to set settimer, and then calls back
To run ()
Timer _. Start (min_timer_interval _, this, animationcontainer: Run );
Run ()
{
Elements elements = elements _;
For (elements: const_iterator I = elements. Begin (); I! = Elements. End (); ++ I)
{
// Make sure that the element is valid.
If (elements _. Find (* I
"AutoLayout Animation"For storyboard Each constraint, you can create a connection to the code by dragging the line like a control.A constraint is an object through which the constant property of the object can modify the number of points of the constraint.After the modification, the animation effect can be achieved by invoking the [Self.view layoutifneeded] method within the block of the UIView's Animatewithduration:: Method, which adjusts all the child views when the layoutifneeded is called.Se
an animation by continuously playing a picture, while a tweened animation is achieved by adding a simple animation effect between two keyframes. There are 5 types of tweened animations supported by the Android app framework. Specifically implemented in the Android.view.animation class library. +alphaanimation: Transparency (Alpha) gradient effect, corresponding to +translateanimation: Displacement gradient, you need to specify the starting and ending coordinates of the move point, correspond
= 0)Return;R = Math. pow (Math. pow (currentPoint. x, 2) + Math. pow (currentPoint. y, 2), 0.5 );Var flag = false;Var caculateMiniAngle = function (angle ){// Caculate the minimum angle diff, if the distance between 2 points less than 1px, we think this 2 ponits angle shocould be the minimum angle diffIf (Math. sin (angle/2) * 2 * r> 1 ){Return caculateMiniAngle (angle/2 );}Else {Return angle;}}MiniAngle = caculateMiniAngle (Math. PI/4 );// Store data to dom elementThis. item. data ("currentPoi
Animate (params, speed, easing, callback) is a function used to create custom animations.
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 "). The value of each attribute indicates the animation ends when the style attribute is reached. If it is a value, the style property will gradually change from th
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 be used to replace margin-left. The value of each attribute indicates how many style attributes are ended when the animation ends. If it is a value, the style property will gradually change from the current value to the specified value. If a string value such as "hide", "show", or "toggle" is use
JQuery implements dynamic addition of three-dimensional numbers (animate method) and jqueryanimate
1. HTML Structure
2. js
3. Image Cases
The above is all the content of this article. I hope this article will help you in your study or work. I also hope to provide more support to the customer's home!
Mode 1: //Animatewithduration takes 1 seconds to execute the code [UIView animatewithduration:1.0 animations:^{ //Store the animation code that needs to be executedSelf.iconbtn.frame=cgrectmake ( the, -, Max, Max); Self.cover.alpha =0.0; // set the transparency of a control } completion:^(BOOL finished) { //the code inside the block is automatically called when the animation finishes executing.[Self.cover Removefromsuperview]; Self.cover=Nil; }];Mode 2: //Execute Animation Code [UIView be
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.