In my code, I want my -webkit-transition: border 2s; to refer on hover, and for -webkit-transition: border 2s; // a different colored border on :focus to refer on focus. How do I do that? Does it require JavaScript?
In my code, I want my -webkit-transition: border 2s; to refer on hover, and
Share
in the selector you specify a
bordershorthand property and a transition that will change only that specific propertyso, on
hoverandfocuspseudoclasses you will change that specific property based on what you want to change