CSS 模拟输入框指针动画效果

@keyframes cursor-blinks {
  0% {
    opacity: 1;
    display: block;
  }

  50% {
    opacity: 0;
    display: none;
  }

  100% {
    opacity: 1;
    display: block;
  }
}

.cursor {
  color: var(--m-color-bg-primary);
  border-left: 1px solid;
  margin-left: 2px;
  height: 33px;
  animation: cursor-blinks 1s infinite steps(1, start);
}

你可能感兴趣的:(css,css,前端,html)