Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Animation with background gradient color

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #34633
    cang_nduc
    Member

    hi all, i just wonder if the gradient color can be animated? as the code below it does not work.

    #test {
    width:50px;
    height:50px;
    -moz-animation:test 3s alternate infinite;
    }
    @-moz-keyframes test {
    0%{
    background:-moz-linear-gradient(270deg,#0F0,#F00);
    }
    100%{
    background:-moz-linear-gradient(270deg,#F00,#0F0);
    }
    }
    #88478

    As @Paulie_D said, not just yet. That doesn’t mean that you can’t be sneaky and find another way to do it though! Using background-position for instance, example here: http://jsfiddle.net/sl1dr/TUGwu/

    #88508
    Mottie
    Member

    @joshuanhibbert Nice! *sigh* I guess I need to sit down and finally learn how to use css3 animation LOL.

    #88514

    @Mottie Thanks! Now that webkit has simplified syntax it’s not so bad.

    #88611

    @cang_nduc Feel free to let us know how you went…

    #88674
    petervin
    Member

    Nikce,thanks for share

    #88675
    Umair
    Member

    Thanks for sharing. But I have a little request to webmaster please add the frame or output box where we check the code examples online.

    #88676
    Mottie
    Member

    @Umair You can demo your code on jsFiddle.net and add a link to a post

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘CSS’ is closed to new topics and replies.