2015-12-04 31 views
-3

如何为一组CSS属性选择多个元素?一组属性的多个CSS选择器

比如我怎么做到这一点?:正确

.facebook:hover,twitter:hover { 
    padding-left: 50px; 
    opacity: 1.0; 
    -webkit-transition: all .7s ease; 
    -moz-transition: all .7s ease; 
    -ms-transition: all .7s ease; 
    -o-transition: all .7s ease; 
    transition: all .7s ease; 
    border-radius: 0px 10px 10px 0px; 
} 
+0

您错过了twitter前面的点(。)。 –

回答

4

这是可能的。 Twitter的课前

.facebook:hover, 
.twitter:hover { 
    padding-left: 50px; 
    opacity: 1.0; 
    -webkit-transition: all .7s ease; 
    -moz-transition: all .7s ease; 
    -ms-transition: all .7s ease; 
    -o-transition: all .7s ease; 
    transition: all .7s ease; 
    border-radius: 0px 10px 10px 0px; 
} 
1

你必须使用:你只是在Twitter的前缺乏.()。

.facebook:hover, .twitter:hover { 
padding-left: 50px; 
opacity: 1.0; 
-webkit-transition: all .7s ease; 
-moz-transition: all .7s ease; 
-ms-transition: all .7s ease; 
-o-transition: all .7s ease; 
transition: all .7s ease; 
border-radius: 0px 10px 10px 0px; 
}