Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

276
Views
CSS, Rotate Marquee

I would like to create a rotate marquee, this is the reference , from reference the red line and blue line animation are running seamlessly. I have try to create my own, but the animation position run away

.roll{
    width: 100vw;
    height: 50px;
    background-size: auto 100%;
    z-index: 2;
    position: relative;
    transform: rotate(6deg);
    -moz-animation: scroll-left 5s linear infinite;
    -webkit-animation: scroll-left 5s linear infinite;
    animation: scroll-left 5s linear infinite;
    color:#000;
  }
  
  
@-moz-keyframes scroll-left {
  0% {
      -moz-transform: translateX(100%) rotate(6deg);
  }
  100% {
      -moz-transform: translateX(-100%) rotate(6deg);
  }
}

@-webkit-keyframes scroll-left {
  0% {
      -webkit-transform: translateX(100%) rotate(6deg);
  }
  100% {
      -webkit-transform: translateX(-100%) rotate(6deg);
  }
}

@keyframes scroll-left {
  0% {
      -moz-transform: translateX(100%) rotate(6deg);
      -webkit-transform: translateX(100%) rotate(6deg);
      transform: translateX(100%) rotate(6deg);
  }
  100% {
      -moz-transform: translateX(-100%) rotate(6deg);
      -webkit-transform: translateX(-100%) rotate(6deg);
      transform: translateX(-100%) rotate(6deg);
  }
}
<div class="roll">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.></div>
Reference

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Define a slight larger width(here 150vw) than the screen and than translate from 0 to that extra width(150vw-100vw)

Also you can use a extra container and rotate it 6deg to remove a glitch kind of effect when animation restarts

body {
  overflow: hidden;
}

.roll {
  margin-top: 100px;
  width: 150vw;
  height: 50px;
  background-size: auto 100%;
  z-index: 2;
  position: relative;
  animation: scroll-left 2s linear infinite;
  color: #000;
  transform-origin: center center;
}

.roll1 {
  transform: rotate(6deg);
}

@keyframes scroll-left {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50vw);
  }
}
<div class="roll1">
  <div class="roll">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
    in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.></div>
</div>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!