CSS3转换是否不支持RGBA后台属性?
我正在尝试以下代码,但没有看到任何类型的转换CSS3转换是否不支持RGBA后台属性?,css,Css,我正在尝试以下代码,但没有看到任何类型的转换 #menu .col_1 a{ -webkit-transition: all .5s ease-out 0.1s; -moz-transition: all .5s ease-out 0.1s; -o-transition: all .5s ease-out 0.1s; transition: all .5s ease-out 0.1s; } #menu .col_1 a:hover{ background
#menu .col_1 a{
-webkit-transition: all .5s ease-out 0.1s;
-moz-transition: all .5s ease-out 0.1s;
-o-transition: all .5s ease-out 0.1s;
transition: all .5s ease-out 0.1s;
}
#menu .col_1 a:hover{
background-color: rgb(255, 255, 255);
background-color: rgba(255, 255, 255, 0.5);
/* For IE 5.5 - 7*/
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);
/* For IE 8*/
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";
}
我把事情搞砸了还是不支持这种类型的转换?悬停功能正常,我只是看不到任何转换。CSS3支持RGBA背景。您需要为初始状态提供背景属性,以便它在悬停状态下更改
#menu .col_1 a{
-webkit-transition: all .5s ease-out 0.1s;
-moz-transition: all .5s ease-out 0.1s;
-o-transition: all .5s ease-out 0.1s;
transition: all .5s ease-out 0.1s;
}
#menu .col_1 a:hover{
background-color: rgb(255, 255, 255);
background-color: rgba(255, 255, 255, 0.5);
/* For IE 5.5 - 7*/
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);
/* For IE 8*/
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";
}
以下是您需要的代码:
#menu .col_1 a {
-webkit-transition: all .5s ease-out 0.1s;
-moz-transition: all .5s ease-out 0.1s;
-o-transition: all .5s ease-out 0.1s;
transition: all .5s ease-out 0.1s;
background-color: rgba(0,0,0,1);
color: red;
}
#menu .col_1 a:hover {
background-color: rgb(255, 255, 255);
background-color: rgba(255, 255, 255, 0.5);
/* For IE 5.5 - 7*/
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);
/* For IE 8*/
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";
}
如果你需要的话,还可以摆弄它:。你在测试什么浏览器?IE9和更低版本不支持CSS转换。