CSS3 transform: scaling results in translation?
I have the following simple HTML code:
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<style>
body {
padding: 30px;
}
a {
display: block;
}
a:hover {
transform: scale(2);
transition: all 4s;
}
</style>
</head>
<body>
<a href=#>Link</a>
</body>
</html>
in which scaling is assumed Link
. However, it shifts to the left. What is the problem?
+3
source to share