CSS Clip clipping element Animation instance

Source: Internet
Author: User

1.CSS

. Fixed{position:fixed;width:90px;Height:90px;background:Red;Border:0px solid Blue; Left:100px;Top:100px;}. Fixed:before{position:Absolute;width:100px;Height:100px;margin:-5px;content:"';Box-shadow:inset 0px 0px 0px 2px blue;Animation:animateone linear 4s infinite; }. Fixed:after{position:Absolute;width:100px;Height:100px;margin:-5px;content:"';Box-shadow:inset 0px 0px 0px 2px blue;Animation:animateone linear 4s infinite;Animation-delay:-2s;/*set negative values here to advance to the specified state*/}@keyframes Animateone{0%,100% {clip:rect (0px,100px,5px,0px); }25%{Clip:rect (0px,5px,100px,0px); }50%{Clip:rect (95px,100px,100px,0px); }75%{Clip:rect (0px,100px,100px,95px); }}

Note:

Animation-delay note two points when used alone:
1. Need to be placed behind the animation property
2. You can set negative numbers to adjust the start state of the animation

Show Results:

More:

CSS Clip Cut Element instance

CSS Clip Properties

CSS Clip clipping element Animation instance

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.