Transition only for the border on hover, but not for background

懵懂的女人 提交于 2019-12-03 05:40:51

What you need to do is set which property you want to transistion properly. Currently you have it as "all" but it needs to be either "background-color" or "border-color" based on which you want to be transitioned.

 transition: border-color 1s ease;  

http://jsfiddle.net/u3Ahk/

You can do border effect in a lots of way. Apply the below css to the class which you gonna apply border effect and change the border style on any event occurs.

 -webkit-transition:  border 3s ease;
 -moz-transition:  border 3s ease;
 -o-transition:  border 3s ease;
 -ms-transition: border 3s ease;
 transition: border 3s ease; 

Also refer these links for advance border effects

https://codepen.io/giana/pen/yYBpVY

http://cssdeck.com/labs/10-crazy-effects-with-css3-border-transitions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!