Is there a way to trigger 2 or more divs with one transition? For example, when clicking on one box, can I make the width and height of both boxes change to 400px simultaneously? Ideally, I would like to achieve this using only HTML and CSS. If not, are there any other options available? Thank you!
<!DOCTYPE html>
<html>
<head>
<style>
.box1{
width:200px;
height:200px;
background-color:red;
}
.box2{
width:200px;
height:200px;
background-color:black;
}
</style>
</head>
<body>
<div class="box1"></div>
<div class="box2"></div>
</body>
</html>