【发布时间】:2020-12-04 18:40:44
【问题描述】:
我的问题在于 CSS3 中的动画 box-shadow。
对于动画,我写了前缀 moz、webkit、o,默认值,但这不起作用。 有什么问题?
.home__number {
width: 150px;
height: 150px;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-size: 64px;
border-radius: 30% 70% 70% 30%/30% 30% 70% 70%;
-webkit-animation: home__item1 10s infinite;
-moz-animation: home__item1 10s infinite;
-o-animation: home__item1 10s infinite;
animation: home__item1 10s infinite;
}
@keyframes home__item1 {
0% {
border-radius: 30% 70% 70% 30%/30% 30% 70% 70%;
box-shadow: 0 -150px 70px -120px #6730ec inset,
0 -220px 70px -120px #7984ee inset, 0 -280px 70px -120px #a9d2ff inset;
}
25% {
border-radius: 58% 42% 75% 25%/76% 46% 54% 24%;
}
50% {
border-radius: 50% 50% 33% 67%/55% 27% 73% 45%;
box-shadow: 0 -140px 70px -120px #a9d2ff inset,
0 -210px 70px -120px #7984ee inset, 0 -280px 70px -120px #6730ec inset;
}
75% {
border-radius: 33% 67% 58% 42%/63% 68% 32% 37%;
}
100% {
box-shadow: 0 -150px 70px -120px #6730ec inset,
0 -220px 70px -120px #7984ee inset, 0 -280px 70px -120px #a9d2ff inset;
}
}
其他关键帧的写法相同。
【问题讨论】:
标签: css cross-browser