2021年4月4日星期日

How to set transition none for a specific css property

I have an element with the transition property

// app.css  .myBtn{     width: 100px;     transition: all 6s ease-out;     background: blue;  }    .myBtn:hover{     width: 300px;     background-color: green;  }  

Now, I want to set transition:none only for background-color property.

Note: I cannot change app.css file code, I have to write on some other file.

Any helpful answer will be appreciated.

https://stackoverflow.com/questions/66947797/how-to-set-transition-none-for-a-specific-css-property April 05, 2021 at 11:06AM

没有评论:

发表评论