首页 > 代码库 > /*带动画效果的hover*/

/*带动画效果的hover*/

 1 <!DOCTYPE html>
 2 /*带动画效果的hover*/
 3 <html lang="en">
 4 <head>
 5     <meta charset="UTF-8">
 6     <title>Title</title>
 7     <style>
 8         .ele{
 9             background-color: #dddddd;/*带动画效果的hover*/
10         }
11         .ele:hover{
12             border: 2px solid red;
13         }
14         .ele:hover .ele-item{
15             color: red;
16         }
17     </style>
18 </head>
19 <body>
20     <div class="ele">
21         <div>123</div>
22         <div class="ele-item">123</div>
23     </div>
24 </body>
25 </html>

 

/*带动画效果的hover*/