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

Use the CSS Transform scale Property to Scale an Element on Hover div transform
0

#1

Tell us what’s happening:
hello please can someone help out here

Your code so far


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

<div></div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 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


#2

Make sure to use scale instead of size value


#3

the correct way is to use ‘scale’ function not ‘size’


#4

thank you for your help its done.


#5

Thank you !
It really helped me.


#6

Hi friends:
I don’t know why it doesn’t work when my pointer hover on the block.

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

#7

Hi @JarryHua!

Please always use the code format option in the editor, so we can properly see the errors in the code.

As I see it, you have a space too much:

div :hover { 
    transform:scale(1.1); 
 }

It should work just fine like this:

  div:hover {
    transform: scale(1.1);
  }