Loading-error-gifI wanted to customise a nice spinner in CSS to indicate loading and it works nicely and looks great in everything except for Mozilla. Can anyone explain to me why, and how to fix it? Or at least point me in the right direction.

<style>
  .loader {
    display: inline-flex;
    width: 0.75em;
    height: 0.75em;
    border-radius: 50%;
    outline: none;
    position: relative;
    animation: rotate 1s linear infinite
  }
  
  .loader::before {
    content: "";
    box-sizing: border-box;
    position: absolute;
    inset: 0px;
    border-radius: 50%;
    border: 0.15em solid;
    animation: prixClipFix 1.8s linear infinite;
  }
  
   :is(h1, h2, h3, h4, h5) .loader::before {
    border-width: 0.1em;
  }
  
  @keyframes rotate {
    100% {
      transform: rotate(360deg)
    }
  }
  
  @keyframes prixClipFix {
    0% {
      clip-path: polygon(50% 50%, 0 0, 10% 0, 10% 0, 10% 0, 10% 0)
    }
    25% {
      clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)
    }
    50% {
      clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%)
    }
    75% {
      clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)
    }
    100% {
      clip-path: polygon(50% 50%, 0 0, 10% 0, 10% 0, 10% 0, 10% 0)
    }
  }
</style>
<div>
  <!-- <div class="spin"></div> -->
  <h1>Loading
    <div class="loader"></div>
  </h1>
  <h2>Loading
    <div class="loader"></div>
  </h2>
  <h3>Loading
    <div class="loader"></div>
  </h3>
  <h4>Loading
    <div class="loader"></div>
  </h4>
  <h5>Loading
    <div class="loader"></div>
  </h5>
  Loading
  <div class="loader"></div>
</div>

仔细看看,我发现,当多边形增长和收缩时,FF并不喜欢div旋转.关闭其中任何一个都可以解决问题,但我希望它同时关闭这两个功能.

推荐答案

多亏了米里亚姆,它现在被修复了!我在.loader个家长班级中增加了border-radius: 0.01px;overflow: hidden;.

Html相关问答推荐

HTML横幅未正确对齐页面顶部

角|将动态html属性添加到子组件

子元素以元素X开始和结束的元素的XPath?

容器内的SVG图像没有响应

页脚与主要内容重叠

如何在网格中拥有离散的行

我的Django应用程序中出现模板语法错误

SVG的动态CSS

在移动屏幕上显示时分支树视图的响应能力问题

Angular MatBadge 在高于 99 时不显示完整数字

使用 Thymeleaf 将图像水平居中

如何将内容放置在侧边栏旁边?

如何使用 CSS 应用带有笔划的文本阴影?

更改标签标签的大小

如何将自定义图像插入 Shiny plot header?

是否可以将文本添加到表格边框?

如何从 razor 页面打开 html 页面

flex-box 中的图像在 Chrome 和 Firefox 中看起来不同 - 如何使它们在 Firefox 中看起来像?

嵌套固定定位的 Div 滚动条渗透到前景中的 Div

如何在锚点可点击的伪元素周围制作空白?