while I was trying to applicate the transform scale, this error is showing, the both h2 has the same properties but one work and the other one don’t.
<!DOCTYPE html>
<html>
<head>
<title>Css3 | 2D Transform Scale</title>
<style>
@import url(‘
* {
box-sizing: border-box;
}
body {
font-family: ‘Poppins’, sans-serif;
font-size: 18px;
padding: 0;
margin: 0;
text-decoration: none;
height: 100%;
}
.scale {
background-color: #e84118;
border-radius: 5px;
text-align: center;
color: white;
width: 250px;
display: block;
margin: auto;
padding: 10px;
margin-top: 22vh;
font-size: 20px;
}
.up, .down {
background-color: #4cd137;
display: block;
width: 300px;
text-align: center;
margin: 20px;
padding: 5px;
border-radius: 4px;
color: #2a2830;
}
.up:hover + .scale {
transform: scale(2);
}
.down:hover + .scale {
transform: scale(2);
}
</style>
</head>
<body>
<h2 class=”up”>hover to scale up</h2>
<h2 class=”down”>hover to scale down</h2>
<div class=”scale”>
this div will scale
</div>
</body>
</html>