Html IE11、Edge和Safari上的盒阴影动画

Html IE11、Edge和Safari上的盒阴影动画,html,css-animations,Html,Css Animations,我有这个小动画。它适用于Chrome、Firefox,但不适用于IE11和Edge。最近我用ios 11在朋友的iphone 6s上试用了一下,但也不起作用。我之所以让它“起作用”,唯一的原因是在动画开始之前设置了长方体阴影。 顺便说一句,转换工作正常 import React from 'react'; const LoadingPage = () => ( <div className="page"> <div className="centered" i

我有这个小动画。它适用于Chrome、Firefox,但不适用于IE11和Edge。最近我用ios 11在朋友的iphone 6s上试用了一下,但也不起作用。我之所以让它“起作用”,唯一的原因是在动画开始之前设置了长方体阴影。 顺便说一句,转换工作正常

import React from 'react';
const LoadingPage = () => (
  <div className="page">
    <div className="centered" id="loading-page">
      <div className="wrapper">
        <div className="loading-container">
          <span className="loading">
            <span>L</span>
            <span>o</span>
            <span>a</span>
            <span>d</span>
            <span>i</span>
            <span>n</span>
            <span>g</span>
          </span>
        </div>
      </div>
    </div>
  </div>
);

export default LoadingPage;
我想知道为什么会发生这种情况以避免将来发生这种情况,这似乎是一个bug。 你已经修好了


刚开始设置
box shadow:none
,IE11就可以设置box shadow的动画。

忽略我之前的评论。我检查了这个页面,它在我的电脑上的Edge和IE11中都可以正常工作尽管如此,请编辑您的问题以发布您的实际CSS<代码>$primary color不是CSS,它看起来像SCSS。好的,对不起,我只需要一分钟。我想使用伪元素,我会试试。但我只是想知道问题是什么,谢谢。是的,这是一只虫子
*, :after, :before{
    box-sizing: border-box;
    padding:0;
    margin:0;
}

html{
    font-size: 62.5%;
    height: 100vh;
    width: 100vw;
}

body{
    background: #282c34
    color: #8A8A8A;
    font-family: 'lato',sans-serif;
    font-size: 16px;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}
.page{
    background: #282c34;
    position: absolute;
    top:0;
    left:0;
    text-align: center;
    overflow-x: auto;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}
.centered{
    padding: 5% 0 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.wrapper{
    max-width: 33.5rem;
    margin: 0 auto;
    @media (min-width: 36em){
        max-width: 50rem;
    }
    @media (min-width: 62em){
        max-width: 60rem;
    }
    @media (min-width: 75em{
        max-width: 80rem;
    }
    @media (min-width: 87.5em){
        max-width: 101rem;
    }
}
#loading-page{
    height: 100%;
    justify-content: center;
}

.loading-container{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.loading {
    margin: 1em auto;
    font-family: 'Montserrat',sans-serif;
}
.loading span {
    font-size:3rem;
    color:#61afef;
    background:#262B37;
    display: table-cell;
    padding: 0 1.5rem;
    line-height: 10rem;
    animation: jumb 2s infinite;
}

@keyframes jumb {
    0% {
        transform:translateY(0);
    }
    50% {
        transform:translateY(-3rem);
        box-shadow:0 1.5rem 0 #61afef;

    }
    100% {
        transform:translateY(0);
    }
}
.loading span:nth-child(1) {
    animation-delay:0s;
}
.loading span:nth-child(2) {
    animation-delay:.1s;    
}
.loading span:nth-child(3) {
    animation-delay:.2s;
}
.loading span:nth-child(4) {
    animation-delay:.3s;    
}
.loading span:nth-child(5) {
    animation-delay:.4s;
}
.loading span:nth-child(6) {
    animation-delay:.5s;    
}
.loading span:nth-child(7) {
    animation-delay:.6s;
}