【发布时间】:2016-09-07 14:19:44
【问题描述】:
我正在尝试在 Internet Explorer 中将鼠标悬停在元素上。
在 Chrome 中,元素 pops 看起来很整洁,但在 IE 中却没有:(
目前在背景颜色出现之前有一个时间延迟。
我猜-webkit-animation-name 是我问题的根源。
<div class="effects">
<a class="hvr-pop" href="#">Pop</a>
</div>
/* Pop */
@-webkit-keyframes hvr-pop {
50% {
-webkit-transform: scale(1.2);
transform: scale(1.2);
}
}
@keyframes hvr-pop {
50% {
-webkit-transform: scale(1.2);
transform: scale(1.2);
}
}
.hvr-pop {
display: inline-block;
vertical-align: middle;
-webkit-transform: translateZ(0);
transform: translateZ(0);
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-moz-osx-font-smoothing: grayscale;
}
.hvr-pop:hover, .hvr-pop:focus, .hvr-pop:active {
-webkit-animation-name: hvr-pop;
animation-name: hvr-pop;
-webkit-animation-duration: 0.3s;
animation-duration: 0.3s;
-webkit-animation-timing-function: linear;
animation-timing-function: linear;
-webkit-animation-iteration-count: 1;
animation-iteration-count: 1;
}
【问题讨论】:
-
请指定出现此问题的 IE 版本。使用 IE11 测试,行为与 Chrome 相同。
-
@Serlite 好主意!在 IE11 中遇到问题 :-)
-
你知道你的小提琴不包含css动画吗?
-
是的,但这对我们没有帮助,因为您正在寻求有关 css 动画的帮助,但没有...
-
如果您介意,是否有可能将其放入 SO sn-p 中?只需简化问题并仅包含您正在测试的动画,以便我们了解可能存在问题的位置。
标签: javascript jquery html css internet-explorer