How do I Use the CSS Transform scale Property to Scale an Element on Hover

Tell us what’s happening:

Your code so far


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

<div></div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/applied-visual-design/use-the-css-transform-scale-property-to-scale-an-element-on-hover

You do not have hover pseudo class for div in your css code.
Add that and then add transform property to that class.
Does this help?

1 Like

Yes it did help, thank you.

1 Like