Marquee CSS

Marquee pur CSS

Marquee CSS

Code CSS:

.marquee {
  height: 25px;
  width: 420px;

  overflow: hidden;
  position: relative;
}

.marquee div {
  display: block;
  width: 200%;
  height: 30px;

  position: absolute;
  overflow: hidden;

  animation: marquee 5s linear infinite;
}

.marquee span {
  float: left;
  width: 50%;
}

@keyframes marquee {
  0% { left: 0; }
  100% { left: -100%; }
}

Code HTML:

<div class="marquee">

<div>

<span>You spin me right round, baby. Like a record, baby.</span>

<span>You spin me right round, baby. Like a record, baby.</span>

</div>

</div>

Les commentaires sont fermés.

Fil RSS des demandes de cet article