How to use CSS3 to achieve the right loop flash effect

Source: Internet
Author: User
How to use CSS3 to achieve the right loop flash effect

<!                 DOCTYPE html>

First, directly on the code! Here's the following:

Second, this white gradient flash effect with CSS3 do very easy also very convenient, the only bad place should be compatibility problem. So now it's generally used on the mobile side.

Three, come here! I think the code comments are relatively clear, so the focus on the painting is good!!!

1, infinite This is the property of the loop execution, with it, can flash a flash drop!

2,-webkit-text-fill-color:transparent; Text fill color is transparent, no setting, can not see the white gradient across the effect!

3,-webkit-background-clip:text; The text outside the background to cut off, if not added, the text does not appear, only show the color gradient!

4, Color-stop () gradient of the Color-stop function, indicating the position and color of the gradient, that is, we can want to where the gradient on the gradient, and then let it move, there will be a flashing effect!

Four, finally, say the idea:

First, set a middle white, gray gradient background color;

Second, the text fill color is set to transparent (to see the white background);

Next, cut out the background color outside the text (text only);

Finally, with @keyframes, let the background white position loop from left to right.

Related Article

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.