【发布时间】:2019-10-06 21:50:05
【问题描述】:
受Fontawesome 的启发,我正在尝试使用 bootstrap3 制作一个旋转图标。它可以通过 CSS3 过渡和变换轻松实现。问题是图标不围绕中心旋转。它在旋转时摆动。
下面粘贴的代码。有谁知道是什么原因造成的?
.spin {
-webkit-animation: spin 2s infinite linear;
-moz-animation: spin 2s infinite linear;
-o-animation: spin 2s infinite linear;
animation: spin 2s infinite linear;
}
@-moz-keyframes spin {
from {
-moz-transform: rotate(0deg);
}
to {
-moz-transform: rotate(360deg);
}
}
@-webkit-keyframes spin {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
}
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<h1 class="text-center">
<span class="glyphicon glyphicon-refresh spin"></span>
<span class="glyphicon glyphicon-record spin"></span>
</h1>
【问题讨论】:
-
它对我有用,但在我的应用程序中单击加载开始时
标签: css twitter-bootstrap