css - 在动画完成之前文本是模糊的?

标签 css

我有一个文字动画,很模糊,看起来很难看。

.text{
  animation: move 2s ease-in;
  position: relative;
  
  /* Added for demo purpose */
  animation-iteration-count: infinite;
}

@keyframes move {
  0% {
    right: -4em;
    opacity: 0;
  }
  80% {
    right: 0.2em;
    opacity: 1;
  }
  100% {
    right: 0em;
  }
}
<span class="text">Text</span>

我用的是 chrome!

我怎样才能让那个模糊消失?谢谢!

最佳答案

试试这个:

.text{
  animation: move 2s ease-in;
  position: relative;
  display: inline-block;
  width: 100%;
  overflow: hidden
}
@keyframes move {
  0% {
    transform: translateX(15%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}
<div class="text">
  Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.

</div>

关于css - 在动画完成之前文本是模糊的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55631033/

相关文章:

html - 上传到服务器时不显示背景图像

html - 样式化 html 选择菜单

css - SASS compass 编译器在多重赋值 @each 循环中窒息

html - 我怎样才能让这个菜单在 IE6 中运行?

javascript - CSS 背景色问题

html - 如何在不使用 JS 的情况下使用 float、clear、position 等避免图像与其他元素重叠?

css - 如何使用scss选择父项

css - 行间距和混合字体大小

css - 背景图像未显示新闻通讯的移动媒体查询的正确图像

css - Angular Material 对齐菜单向右