尝试使这种效果起作用,在 chrome 和 opera 上运行良好,但在 safari 或 firefox 上运行不正常。
怎么了?
我在我的 html 代码中使用了一个 span 标签
CSS
@-webkit-keyframes pulse {
0% {
-webkit-transform: scale(1, 1);
}
50% {
-webkit-transform: scale(1.3, 1.3);
}
100% {
-webkit-transform: scale(1, 1);
}
}
@keyframes pulse {
0% {
transform: scale(1, 1);
}
50% {
transform: scale(1.3, 1.3);
}
100% {
transform: scale(1, 1);
}
}
.take {
margin-left: 40px;
color: #c8262d;
width: 20px;
height: 20px;
-webkit-animation: pulse 1s linear infinite;
animation: pulse 1s linear infinite;
}
HTML
<span class="take">Take Action Today ⤑</span>
最佳答案
我认为您只需要将 display:block;
添加到您的 .take
规则
.take {
margin-left: 40px;
color: #c8262d;
width: 20px;
height: 20px;
-webkit-animation: pulse 1s linear infinite;
animation: pulse 1s linear infinite;
display:block;
}
关于css3 变换 :scale doesn't work in Safari,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26520024/