Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7015157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:36:55+00:00 2026-05-27T22:36:55+00:00

I’m pretty new to CSS3 animations so this is a tough one for me.

  • 0

I’m pretty new to CSS3 animations so this is a tough one for me. I’m trying to create a kind of reflection effect on a topbar on my website to make users aware of the bar.

So I actually want a reflection wander from the left to the right of the bar rather quick and with easing.

I have two problems though …
1.) I have no idea why this thinkg won’t work with background-size:cover; or background-size:100% 100%? It does just work when I specify a pixel width, however I just want it always to be 100% because the bar itself is always 100% wide.

2.) I have no idea how I could make the thing pause for like 3 seconds. So the reflection effect should start when the page is loaded, then pause for 3 seconds and then repeat.

Is this possible?

<div class="masked">
    <span class="inner">
    This is some Text
    </span>
</div>

background: linear-gradient(-45deg,  rgba(85,85,85,1) 0%,rgba(85,85,85,1) 48%,rgba(255,255,255,1) 50%,rgba(85,85,85,1) 52%,rgba(85,85,85,1) 100%);
    background-size:1500px 20px;
    animation-name: masked-animation;
    animation-duration: 2s;
    animation-delay: 1s;
    animation-iteration-count: 1;
    animation-timing-function: ease-in-out;

DEMO http://jsfiddle.net/7Akwf/

Can someone please help me with that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:36:56+00:00Added an answer on May 27, 2026 at 10:36 pm

    To get the animation to pause 3 seconds and continue you have to first set animation-iteration-count: infinite; and then use the @keyframes definition to control the delay by using a percent to be the pause.

    In the demo below, I’m using 0%-50% to be the full animation. Then I use %50-%100 to be the pause.

    If you want to use background-size: 100% 100%;, you need to set your background-position: -2000px 0; so it’s totally off the left side of the screen if you want your animation to scroll by. You also need to adjust your @keyframes so it scrolls totally off the right side when done. Because of this extra distance, you’ll need to adjust your duration accordingly to get the effect you’re looking for.

    Demo: http://jsfiddle.net/ThinkingStiff/jaRW3/

    @keyframes masked-animation {
        0% {background-position: -2000px 0;}
        50% {background-position: 2000px 0;}
        100% {background-position: 2000px 0;}
    }
    

    Here I’m using a 6s duration, of which 50% will be the pause and %50 will be the animation, or 3 seconds each. It also waits 3 seconds before starting. This uses the shorthand syntax which saves a lot of space.

    animation: masked-animation 6s ease-in-out 3s infinite;
    background-position: -2000px 0;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.