Answers for "HORIZONTAL NEWS TICKER"

0

HORIZONTAL NEWS TICKER

/* (A) FIXED WRAPPER */
.hwrap {
  overflow: hidden; /* HIDE SCROLL BAR */
  background: #eee;
}
 
/* (B) MOVING TICKER WRAPPER */
.hmove { display: flex; }

/* (C) ITEMS - INTO A LONG HORIZONTAL ROW */
.hitem {
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  text-align: center;
}
 
/* (D) ANIMATION - MOVE ITEMS FROM RIGHT TO LEFT */
/* 4 ITEMS -400%, CHANGE THIS IF YOU ADD/REMOVE ITEMS */
@keyframes tickerh {
  0% { transform: translate3d(100%, 0, 0); }
  100% { transform: translate3d(-400%, 0, 0); }
}
.hmove { animation: tickerh linear 15s infinite; }
.hmove:hover { animation-play-state: paused; }
Posted by: Guest on September-20-2021
0

HORIZONTAL NEWS TICKER

<div class="hwrap"><div class="hmove">
  <div class="hitem">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div>
  <div class="hitem">Aliquam consequat varius consequat.</div>
  <div class="hitem">Fusce dapibus turpis vel nisi malesuada sollicitudin.</div>
  <div class="hitem">Pellentesque auctor molestie orci ut blandit.</div>
</div></div>
Posted by: Guest on September-20-2021

Browse Popular Code Answers by Language