my question is , when I hover the button div it does change the color of the book div I can't understand it, please clear me this.
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<style media="screen">
.book{
height: 100px;
width:100px;
background-color: blue;
}
.button{
height: 40px;
width: 100px;
background-color: black;
color: white;
}
.button:hover .book{
background-color: pink;
}
</style>
</head>
<body>
<div class="book">
BOOK
</div>
<div class="button">
BUTTON
</div>
</body>
</html>
Aucun commentaire:
Enregistrer un commentaire