Quantcast
Channel: PhpBB3 BBCodes
Viewing all articles
Browse latest Browse all 89

Snippets • Ticker BBCode

$
0
0
Ticker BBCode

The Ticker BBCode let you insert at ticker in your posts.

Demo:BBCode:

Code:

[ticker]{TEXT}[/ticker]
HTML:

Code:

<aside class="ticker"><div class="ticker__inner"><p>{TEXT}</p></div></aside>
Helpline:

Code:

Ticker: [ticker]Put Your text here[/ticker]
Example:

Code:

[ticker]Lorem ipsum dolor sit amet, consectetuer adipiscing elit.[/ticker]
Now, to make this work we need some css.
You can add it to the bottom of your styles colours.css

Code:

/** Ticker **/.ticker {  --ticker-duration: 20s;  z-index: 10;  overflow: hidden;  padding: 0.5rem;}.ticker__inner {  display: flex;  align-items: center;  justify-content: center;  flex-wrap: nowrap;  white-space: nowrap;  animation-iteration-count: infinite;  animation-timing-function: linear;  animation-name: ticker;  animation-duration: var(--ticker-duration);  text-align: center;  width: max-content;  padding-left: 100%;}@media (prefers-reduced-motion: reduce) {  .ticker__inner {    flex-wrap: wrap;    white-space: inherit;    padding-left: 0;    width: auto;  }}.ticker__inner p {  margin: 0 2rem;}@keyframes ticker {  0% {    transform: translate3d(0%, 0, 0);  }  100% {    transform: translate3d(-100%, 0, 0);  }}
This piece controls the speed:

Code:

  --ticker-duration: 20s;
Save, upload and refresh

Statistics: Posted by Stoker — Yesterday, 20:26



Viewing all articles
Browse latest Browse all 89

Trending Articles