小编Jon*_*eis的帖子

HTML:show> 用纯文本

在HTML文件中,如果我希望浏览器显示特殊符号,例如>,我可以使用特殊的转义字符序列>,浏览器会自动将其转换为>.

但如果我不希望它被转移到>怎么办?如果我碰巧希望字符序列以纯文本显示怎么办?

html

1
推荐指数
1
解决办法
79
查看次数

如何让我的动画在无限循环中从左移动到右?

我的动画目前正在以方形运动移动。但是,我希望它从屏幕的左侧移动到右侧,然后在无限循环中再次返回。有人能帮忙吗?

.animation {
  width: 10px;
  height: 10px;
  background-color: red;
  position: relative;
  animation-name: example;
  animation-duration: 4s;
}

@keyframes example {
  0% {
    background-color: red;
    left: 0px;
    top: 0px;
  }
  25% {
    background-color: red;
    left: 200px;
    top: 0px;
  }
  50% {
    background-color: red;
    left: 200px;
    top: 200px;
  }
  75% {
    background-color: red;
    left: 0px;
    top: 200px;
  }
  100% {
    background-color: red;
    left: 0px;
    top: 0px;
  }
}
Run Code Online (Sandbox Code Playgroud)
<div class="animation"></div>
Run Code Online (Sandbox Code Playgroud)

html javascript css css-animations

0
推荐指数
1
解决办法
4372
查看次数

标签 统计

html ×2

css ×1

css-animations ×1

javascript ×1