我正在尝试创建带有变换旋转属性的摆动按钮,它在 Opera 和 Chrome 浏览器中工作正常,但在 Firefox 中它在按钮边框中创建奇怪的像素问题:
我的按钮和摆动关键帧的 css 代码
.RedButton {
background-color: #bc0000;
border-radius: 7px;
border: 1px solid #bc0000;
display: inline-block;
cursor: pointer;
color: #fff !important;
font-family: Arial;
font-size: 30px;
font-weight: bold;
padding: 7px 24px;
text-decoration: none;
margin-top: 15px;
animation: swing 5s infinite;
-moz-animation: swing 5s infinite;
transition: 0.2s;
-moz-transition: 0.2s;
}
@-moz-keyframes swing {
20%,
60% {
-moz-transform: rotate(5deg);
}
40%,
80% {
-moz-transform: rotate(-5deg);
}
100% {
-moz-transform: rotate(0deg);
}
}
@keyframes swing {
20%,
60% { …Run Code Online (Sandbox Code Playgroud)