【发布时间】:2017-04-13 22:46:43
【问题描述】:
我有一个简单的问题:如果我将 css 转换附加到伪元素(:after,:before)和主项目,伪元素的动画等待主项目的动画结束。我想同时做两个动画。 我只有在 FireFox (50.0.1) 中的 Chrome (54.0.2840.99) 中才有这个问题,它的表现很好。
这个小提琴显示了问题: https://jsfiddle.net/CptCrunch/wtse7e8b/1
body {
text-align: center;
}
a {
font-size: 50px;
font-weight: 800;
color: red;
text-decoration: none;
transition: all 1s linear 0s;
}
a:hover {
color: blue;
}
a::before {
content: "\0005B";
margin-right: 30px;
transition: all 1s linear 0s;
}
a::after {
content: "\0005D";
margin-left: 30px;
transition: all 1s linear 0s;
}
有没有办法解决这个问题?感谢您的帮助。
【问题讨论】:
标签: html css google-chrome css-transitions