Kjaal
Kjaal

Reputation: 57

Transition on button border-color is not applied

I am having issues applying a transition to a border color. I have tried almost every possible variation to get this to work.

The HTML

<button class="calltoaction">Click me</button>

The CSS

.calltoaction {
    border: 3px;
    border-style: solid;
    border-color: #ececec;

    -webkit-transition: border-color 3ms;
    -moz-transition: border-color 3ms;
    -ms-transition: border-color 3ms;
    -o-transition: border-color 3ms;
    transition: border-color 3ms;
}

.calltoaction:hover {
    border-color: #000;
}

I have tried Fiddling around with it, but with no luck.

What i have tried

This example is rather simple and should be working, any ideas as to why it doesn't?

Upvotes: 1

Views: 109

Answers (1)

Glen
Glen

Reputation: 362

Remember the transition time is counted in milliseconds. You have set it to 3ms which is far too quick. Set it to 3000ms.

Upvotes: 2

Related Questions