尝试一下。 browser prefix
将为您提供帮助。经过测试的野生动物园5.1.7
.abcz {
width: 200px;
height: 200px;
border: 1px solid #000;
-webkit-animation: ani 5s 1 both linear;
animation: ani 5s 1 both linear;
}
@-webkit-keyframes ani {
0% {
text-align: right;
color: red;
}
50% {
text-align: center;
text-align: -webkit-center;
color: blue;
text-decoration: underline;
}
100% {
color: green;
}
}
@keyframes ani {
0% {
text-align: right;
color: red;
}
50% {
text-align: center;
text-align: -webkit-center;
color: blue;
text-decoration: underline;
}
100% {
color: green;
}
}
<div class="abcz">
abcd
</div>
,
我不知道这是否是您想要的效果,但是您可以为该位置设置动画
.abcz {
width: 200px;
height: 200px;
border: 1px solid #000;
position: relative;
overflow: hidden;
}
.animated {
position: absolute;
animation: ani 5s 1 both linear;
}
@keyframes ani {
0% {
color: red;
left: 100%;
transform: translateX(-100%);
}
50% {
color: blue;
text-decoration: underline;
left: 50%;
transform: translateX(-50%);
}
100% {
color: green;
left: 0;
transform: translateX(0);
}
}
<div class="abcz">
<div class="animated">abcd</div>
</div>
本文链接:https://www.f2er.com/3160256.html