Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/hadoop/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CSS3转换是否不支持RGBA后台属性?_Css - Fatal编程技术网

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转换。