I have 2 divs, i want to hover the first one to affect both of them, i found out on the forum how to affect the second by hovering the first one, but not both of them.
There is my code:
.red{
height: 150px;
width: 150px;
background-color: red;
float:left;
margin-right: 20px;
}
.blue{
height: 150px;
width: 150px;
background-color: blue;
float:left;
}
.red:hover ~ .blue{
transition: all .2s ease-in-out;
transform: scale(1.1);
}
<html>
<head>
</head>
<body>
<div class="red"></div>
<div class="blue"></div>
</body>
</html>
Thanks for helping me.