使用 css 让 div 内的文本闪烁两次

use*_*053 3 css

我怎样才能使用CSS每5秒闪烁两次文本

我有一个div

<div class="blink">text</div>
Run Code Online (Sandbox Code Playgroud)

我想使用 css 每 5 秒闪烁此文本两次

我怎样才能做到这一点?

我试过这个

如何让CSS动画每10秒播放一次

但不能在 ie 中工作

我希望它能在 ie 和 chrome 中工作

Tem*_*fif 5

使用动画并调整属性,如下所示:

.blink {
  color:black;
  font-size:30px;
  font-weight:bold;
  animation:blink 2.5s linear infinite alternate 2.5s;

}

@keyframes blink {
  80% {
    color:black;
  }
  90% {
    color:red;
  }
  100% {
    color:black;
  }
}
Run Code Online (Sandbox Code Playgroud)
<div class="blink">This text will blink twice every 5 seconds</div>
Run Code Online (Sandbox Code Playgroud)