CSS3 to achieve shock wave effect

Source: Internet
Author: User
This article mainly introduces the CSS3 to realize the shock wave effect of the sample code, small series feel very good, and now share to everyone, but also for everyone to do a reference. Follow the small series together to see it, hope to help everyone.

Recently, many browser button click will appear the following shock wave effect, out of curiosity, referring to the information on the web, the effect of this study to achieve.

Implementation ideas:

Observation of the wave from small to large, involving the CSS3 property changes have width,height,left,top,opacity, first through the pseudo-class implementation of the shock wave layer, and the need to set the center point before and after the shock wave location (here involves a little bit of mathematical knowledge: drawing to calculate the location of two points), Finally set transition-duration:0 realize instantaneous change, PS learning to use a:active can simulate the mouse to achieve the effect of clicking

Simple painting (very dish):

Code to implement:


  

The effect of the implementation:

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.