Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

Aurelian Spodarec
Aurelian Spodarec
10,789 Points

How to ease in fast, ease out slow?

Hi,

How can I make a ease out fast, and ease out slow?

So you have a lot of boxes, and once you hover the mouse over it, the box will after .1 sec display fully, but when hovering out, it will take 2.3sec for the hover to go away.

I have tried all ease out and cubis stuff.. doesn't work.

1 Answer

I'm not an expert at CSS, but I know you can check out the Mozilla Documentation for some juicy stuff :)

Hope this helps.

~Alex

Aurelian Spodarec
Aurelian Spodarec
10,789 Points

Here's the code that worked out for me :)

    @include e(item) {
        &:hover .m-portfolio__active{
            opacity: 1; 
            -webkit-transition-delay: 0s;
            -moz-transition-delay: 0s;
            -ms-transition-delay: 0s;
            -o-transition-delay: 0s;
            transition-delay: 0s;
        }

    }

    @include e(item-container) {
        position: relative;     
    }

    @include e(active) {
        opacity: 0;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;

        background-color: rgba(0,0,0,.7);
        // border: 3px solid;
        // border-color: $brand-color;

        -webkit-transition: .1s all;   
        -webkit-transition-delay: .2s; 
        -moz-transition: .1s all;   
        -moz-transition-delay: .2s; 
        -ms-transition: .1s all;   
        -ms-transition-delay: .2s; 
        -o-transition: .1s all;   
        -o-transition-delay: .2s; 
        transition: .1s all;   
        transition-delay: .2s; 
    }

Congrats! :)

Aurelian Spodarec
Aurelian Spodarec
10,789 Points

This actually didn't work. It was an illusion : p but the effect is sort of there, just not quite right.

Oh...