/*去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;
10             border: 2px solid transparent;/*去hover动画效果*/
11         }
12         .ele:hover{
13             border: 2px solid red;
14         }
15         .ele:hover .ele-item{
16             color: red;
17         }
18     </style>
19 </head>
20 <body>
21     <div class="ele">
22         <div>123</div>
23         <div class="ele-item">123</div>
24     </div>
25 </body>
26 </html>

 

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