Use the CSS Transform scale Property to Scale an Element on Hover heeelp

Tell us what’s happening:

hey guys, I did everything which I thought was right, but its not working…
help me over here. Much love!

Your code so far


<style>
  div { 
    width: 70%;
    height: 100px;
    margin:  50px auto;
    background: linear-gradient(
      53deg,
      #ccfffc,
      #ffcccf
    );
  }
  
  div: hover {
    transform: scale(1.1);
  }
  
</style>

<div></div>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.1 Safari/605.1.15.

You’ve got a small typo. You put in a space where there shouldn’t be one.

Remove the space between div: and hover so it reads:

div:hover {
       transform: scale(1:1);
    }
1 Like