/*带动画效果的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>

 

posted @ 2017-03-06 20:16  失落的黎明  阅读(207)  评论(0编辑  收藏  举报