首页htmlmoveAnimation - 如何使用CSS3动画创建选取框

Animation - 如何使用CSS3动画创建选取框

我们想知道如何使用CSS3动画创建选取框。

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src="http://leaverou.github.com/prefixfree/prefixfree.js"></script>
<style type='text/css'>
.marquee {
  width: 450px;
  margin: 0 auto;
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
  animation: marquee 3s linear infinite;
}

.marquee:hover {
  animation-play-state: paused
}

@keyframes marquee { 0% { text-indent: 100% }
              100%{text-indent: -50%}}
</style>
</head>
<body>
  <p class="marquee">Lorem ipsum dolor sit amet</p>
</body>
</html>