Cubic-bezier Bézier curve CSS3 Animation tool

Source: Internet
Author: User

Today in a book called "HTML5 Touch Interface Design and development" to see a bouncing ball complex animation effect, first speed down, stop, and then bounce gradually slowed down. is done with the Cubic-bezier Bezier curve. So I went to learn a little bit about the cubic-bezier Bezier curve.

Cubic-bezier is less used because the browser is incompatible in the PC side. But on the phone side, you can use and bring cool animations and experiences.

Easing function: http://www.xuanfengge.com/easeing/easeing/

cubic-bezier:http://cubic-bezier.com/

The Cubic-bezier is the drawing method in the Bezier curve.

Several animation effects commonly used in CSS3:

1 Ease:cubic-bezier (0.25, 0.1, 0.25, 1.0) 2 linear:cubic-bezier (0.0, 0.0, 1.0, 1.0) 3 Ease-in:cubic-bezier (0.42, 0, 1.0, 1.0) 4 ease-out:cubic-bezier (0, 0, 0.58, 1.0) 5 Ease-in-out:cubic-bezier (0.42, 0, 0.58, 1.0)

Bezier curves define a curve by four points. These four values describe the location of the control point P1,P2, and the other two points are always p0 (0,0) P3. Control points are the curves in the chart that give the ball a (positive or negative) acceleration as it bounces and drops. (0,.27,.32,1) plays a role in the Ascent, and (1,0,0.96,0.91) plays a role in the descent process.

Now that we know a little bit about the Bezier curve, let's look at a bouncing ball example.

HTML section:

1 <  ID= "Ball"></div>2<   ID= "floor></div>

CSS section:

1 Body{margin:0;padding:0;}2 #ball{3   background:Red;4   Height:100px;5   width:100px;6   position:Absolute;7   Top:10px;8    Left:20px;9   Border-radius:50px;Ten} One #floor{ A   position:Absolute; -   Bottom:10px; -    Left:0px; the   width:350px; -   Height:1px; -   Border-top:5px Solid Brown; -}

Cubic-bezier Bézier curve CSS3 Animation tool

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.