Skip to content Skip to sidebar Skip to footer

How Can I Make My Vertical Css Marquee Repeat

I'm trying to make a vertical marquee loop without any whitespace/gaps but I can't seem to make it repeat. I added aria-hidden='true' which worked on my horizontal marquee but does

Solution 1:

/* Please try this instead */

body {
	background-color: black;
}

.side-bar {
	top: 0;
	left: 0;
	height: 100%;
	color: white;
	writing-mode: vertical-rl;
	text-orientation: sideways-right;
}

.marquee p {
	overflow: hidden;
	white-space: nowrap;
	height: 100%;
}

.marquee span {
	animation: marquee 8s linear infinite;
	display: inline-flex;
	padding-right: 10px;
	font-size: 4rem;
}

@keyframes marquee {
	from {
		transform: translateY(-100%);
	}

	to {
		transform: translateY(0);
	}
}
    <div class="position-fixed side-bar">
      <div class="row marquee">
        <div class="col-12 bg-white">
          <p class="m-0 p-0 p-3">
            <span class="m-0 p-0 pb-4" aria-hidden="true">USE CODE "MLT"</span>
            <span class="m-0 p-0 pb-4" aria-hidden="true">USE CODE "MLT"</span>
            <span class="m-0 p-0" aria-hidden="true">USE CODE "MLT"</span>
          </p>
        </div>
      </div>
    </div>
.marquee {
  overflow: hidden;
  white-space: nowrap;
}

@keyframes marquee {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(100%);
  }
}

This code changes to the following.

.marquee p{
  overflow: hidden;
  white-space: nowrap;
  height:100%;
}

@keyframes marquee {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

Solved in codepen

https://codepen.io/Rayeesac/pen/OJMWMpm

More examples are

Horizontal marquee without white space and JS

Vertical marquee without white space and JS


Post a Comment for "How Can I Make My Vertical Css Marquee Repeat"