【发布时间】:2016-02-05 19:14:41
【问题描述】:
我在 codepen.io 中找到了这个动画。一切正常,但是当我在 Firefox 中对其进行测试时,动画无法正常工作。
代码已经有浏览器前缀,所以我不知道什么在 FF 中不起作用。
<!DOCTYPE html>
<html>
<head>
<style>
.loading {
margin-left:auto;
margin-right:auto;
display:table;
border-width:30px;
border-radius:50%;
-webkit-animation:spin 1s linear infinite;
-moz-animation:spin 1s linear infinite;
-o-animation:spin 1s linear infinite;
animation:spin 1s linear infinite;
}
.style-1 {
border-style:solid;
border-color:#001e60 transparent
}
.style-2 {
border-style:double;
border-color:#001e60 transparent;
}
.style-3 {
border-style:double;
border-color:#001e60 #fff #fff;
}
@-webkit-keyframes spin {
100% {
-webkit-transform:rotate(359deg);
}
}
@-moz-keyframes spin {
100% {
-moz-transform:rotate(359deg);
}
}
@-o-keyframes spin {
100% {
-moz-transform:rotate(359deg);
}
}
@keyframes spin {
100% {
transform:rotate(359deg);
}
}
</style>
</head>
<body>
<div style="display: block;" class="loading-container">
<span id="loadingIndicator" class="loading style-3"></span>
</div>
</body>
</html>
【问题讨论】:
标签: html css css-transitions