0

Hi guys I cannot scale my anchor tag on hover, this is my code :

a {
    color: red;
    text-decoration: none;
    transition: all 0.5s;

}

a:hover{
  color:blue;
  transform:scale(3);
}
<a>TEST</a>
Mateusz Kocz
  • 4,492
  • 1
  • 25
  • 27
Alexander
  • 1,288
  • 5
  • 19
  • 38

1 Answers1

2

transforms dont work on non replaced inline element , so you can just give display: inline-block

  a {
    color: red;
    text-decoration: none;
    transition: all 0.5s;
    display: inline-block;
}

a:hover{
  color:blue;
  transform:scale(3);
}
<a>TEST</a>

refer here https://drafts.csswg.org/css-transforms-1/#terminology

ashish singh
  • 6,526
  • 2
  • 15
  • 35