user2049259
user2049259

Reputation: 553

How to create a line pass through text from left to right with transition?

I have already got these code:

http://jsfiddle.net/Dingzhou/brj8tnbg/

@-webkit-keyframes inout_webkit {
0% {
    background:-webkit-linear-gradient(left, #000, #000 0, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0));
    background-size: auto 8px;
    background-repeat: repeat-x;
    background-position: 0 50%;
}
3.3% {........

But the result is not 100% good because what I want is only 1 line but not multiple lines appear together...

Can someone help me to check if the code is wrong?

Upvotes: 2

Views: 198

Answers (1)

flowstoneknight
flowstoneknight

Reputation: 1236

Instead of background-size: auto 8px use background-size: 100% 8px.

Upvotes: 2

Related Questions