Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/65.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转换不适用于所有<;a>;按预期的元素_Css_Hyperlink_Hover_Anchor_Transition - Fatal编程技术网

CSS3转换不适用于所有<;a>;按预期的元素

CSS3转换不适用于所有<;a>;按预期的元素,css,hyperlink,hover,anchor,transition,Css,Hyperlink,Hover,Anchor,Transition,在我的标题中,我指定了这个CSS a:link { -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; color:#3462D6; } a:visited { -moz-transition: a

在我的标题中,我指定了这个CSS

a:link {
    -moz-transition: all 0.2s ease-in-out;
    -o-transition: all 0.2s ease-in-out;
    -webkit-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;
    color:#3462D6;
}

a:visited {
    -moz-transition: all 0.2s ease-in-out;
    -o-transition: all 0.2s ease-in-out;
    -webkit-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;
    color:#3462D6;
}

a:hover {
    -moz-transition: all 0.2s ease-in-out;
    -o-transition: all 0.2s ease-in-out;
    -webkit-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;
    color:#82D1F7;
}

a:active {
    -moz-transition: all 0.2s ease-in-out;
    -o-transition: all 0.2s ease-in-out;
    -webkit-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;
    color:#3462D6;  
}

a {
    text-decoration: none;
}
对于大多数链接,过渡都是有效的,但是我访问过的链接在Firefox中没有在Chrome中播放动画(我假设其他webkit浏览器也是如此),但是,所有链接都可以很好地执行过渡动画

在Chrome中链接没有转换的原因是什么?
url为

将活动状态移到悬停状态上方。-链接、访问、活动、悬停、聚焦,您需要将转换应用于所有状态。过渡不是遗传的。

我不知道你能做到这一点,今天我学到了一些东西!当你说访问是指点击链接并返回?如果是这样,您只能使用
:visted
Yes应用颜色。检查我的更新代码。仍然遭受同样的错误。我已经按照你说的做了,但是错误仍然在发生。是的,我已经确定要清除缓存。而且,我的XHTML类和研究表明,顺序是“链接、访问、悬停、活动”,编辑我的原始帖子以反映我的新代码更改,但仍然存在相同的错误。谢谢你的帮助!嗯,您编辑的代码不会显示各种状态下的转换。CSS3转换不是继承的属性。您需要将所有转换添加到希望具有转换的所有元素中。()它的行为就像继承的一样,即使我将它添加到所有这些文件中,它的行为仍然完全相同。不管我做什么,“访问”都不会得到它。在Firefox中运行良好,而不是在Webkit中。