I was just wondering how to create this using animations. I am doing this with this code below from HEADLESS.HORSE But I want to specify the font, size and color.
Thanks!
<div class="marquee">
<div>
<span><a href="URL HERE?">HELLO WORLD THE MESSAGE CAN BE ANY LENGTH. MESSAGE 1.</a></span>
<span><a href="URL HERE?">HELLO WORLD THE MESSAGE CAN BE ANY LENGTH. MESSAGE 2.</a></span>
</div>
</div>
<style>
body {
margin: 20px;
}
.marquee {
position: relative;
overflow: hidden;
width: 100%;
height: 25px;
}
.marquee div {
position: absolute;
display: block;
overflow: hidden;
width: 200%;
height: 30px;
animation: marquee 10s linear infinite;
}
.marquee span {
float: left;
width: 50%;
}
@keyframes marquee {
0% {
left: 0;
}
100% {
left: -100%;
}
}
</style>
Hi,
I am using this code below but the text appears cut off and in a blue color. Any ideia on how can I fixed it.
Thanks
<div class="marquee">
<div>
<span><a href="URL HERE">HELLO WORLD THE MESSAGE CAN BE ANY LENGTH. MESSAGE 1.</a></span>
<span><a href="URL HERE">HELLO WORLD THE MESSAGE CAN BE ANY LENGTH. MESSAGE 2.</a></span>
</div>
</div>
<style>
body {
margin: 20px;
}
.marquee {
position: relative;
overflow: hidden;
width: 100%;
height: 25px;
}
.marquee div {
position: absolute;
display: block;
overflow: hidden;
width: 200%;
height: 30px;
animation: marquee 10s linear infinite;
background-color: transparent;
}
.marquee span {
float: left;
width: 50%;
font-size: 48pt;
font-family: 'HKCompression-HeavyCondRounded', sans-serif;
color: #000000;
padding: 0 20px;
}
@keyframes marquee {
0% {
left: 0;
}
100% {
left: -100%;
}
}
</style>
blue probably because it is a link and if you do not set up a css stye for the link it gets shown in “default blue”.
and you can play around with the width in the css and see if it still gets cut off.