Forums

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

Home Forums CSS Fading CSS Gradient?

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #40602
    NoizyCr1cket
    Participant

    Hi. I am trying to make a css gradient fade to a different color gradient. I didn’t use a background image because I know you can’t fade those, but can you fade a gradient?

    Here’s a test page to show you what I need to fade: http://www.gchiller.com/gradient-fade
    (The gray border is just to show the rollover area, it won’t be there in the final product.)

    #113312
    chrisburton
    Participant

    I think what you might be looking for is `box-shadow`.

    #113313
    JohnMotylJr
    Participant

    @NoizyCr1cket, would you want to try a JavaScript way of absolving this problem?

    #113314
    NoizyCr1cket
    Participant

    @ChristopherBurton : I’ll check that out


    @John
    : Sure, if it works and is relatively simple.

    #113315
    NoizyCr1cket
    Participant

    @ChristopherBurton : I tried recreating the size of the gradient using box-shadow, but I can’t seem to get the sizes right. Could you please help? The original gradient is 12px wide.

    #113317
    chrisburton
    Participant
    #113320
    JohnMotylJr
    Participant

    @NoizyCr1cket,

    Is there some kind of event that fires the ‘fade’ for the gradient (hover, click, mousedown, etc)?

    Otherwise Chris got it by adding the box-shadow.

    #113324
    JohnMotylJr
    Participant

    Ok, i totally was misunderstanding what you were wanting, glad these guys could help ya out. And i never really thought about my name with the underscores before, thanks for the heads up

    #113322
    NoizyCr1cket
    Participant

    @ChristopherBurton, thanks! I got it working with transitions.


    @John
    , Sorry, I decided to use the box-shadow method. But thanks anyway!

    P.S. Not sure if you already know this, but, since your username has underscores on both sides, when I try to @ it, it makes it italicized so I have to just use “@John”. No big deal.

    #113323
    Taufik Nurrohman
    Participant
Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘CSS’ is closed to new topics and replies.