Transformation does not work when you hover, tell me what's wrong? .menu does not expand when you hover on it
.menu { width:100px; height:100px; background:orange; transform:scale(0.5); } .menu:hover { transform:scale(1); } .show-menu { width:50px; height:50px; background:black; position:absolute; z-index:1000; top:33px; left:33px; }
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Документ без названия</title> <link href="about.css" rel="stylesheet" type="text/css"> </head> <body> <div class="menu"></div> <div class="show-menu"></div> </body> </html>
menu
and now it hides behind theshow-menu
... so if you remove thetransform:scale(0.5);
you will see it right away ..... and yes thescale(1)
does nothing .... it is equivalent to multiplying by 1 ...... you must write at leastscale(2)
or something more than 1 - Alexey Shimansky