html - Change circle background on hover using css animation -


i have circle background color set red, want change background on hover using css animation how can that? here code:

.circle{    background-color: red;    border-radius: 50px;    height: 100px;    width: 100px;    }
<html>  <body>  <div class="circle"></div>  </body>  </html>

for changing color using css animation try using code below.

.circle    {   border-radius: 50px;   height: 100px;   width: 100px;   background: linear-gradient(to right, blue 50%, red 50%);   background-size: 200% 100%;   background-position: right bottom;   transition: 2s ease;   }     .circle:hover {    background-position: left bottom;    } 
<div class="circle"></div>


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -