/* Styles for text container */
.scroll-container {
overflow-x: auto;
white-space: nowrap;
}
/* Styles for text within the container */
.scroll-text {
display: inline-block;
cursor: pointer;
margin-right: 20px; /* space between words */
transition: color 0.3s ease;
}
/* Style for hovered text */
.scroll-text:hover {
color: red; /* or desired color */
}
<div class="scroll-container">
<!-- Textul cuvintelor pe care le dorești să le faci să defileze -->
<span class="scroll-text" data-link="link1.html">Word1</span>
<span class="scroll-text" data-link="link2.html">Word2</span>
<span class="scroll-text" data-link="link3.html">Word3</span>
<!-- Adaugă altele după nevoie -->
</div>
.Marquee * {
font-family: serif!important;
color:blue!important
}
hjgfuifuy jvi kyfyi iyvio
document.addEventListener('DOMContentLoaded', function() {
// Get all text elements within the container
var scrollTexts = document.querySelectorAll('.scroll-text');
// Add an event listener for each text within the container
scrollTexts.forEach(function(text) {
text.addEventListener('click', function() {
// Get the link associated with the text
var link = text.dataset.link;
// Redirect to the page associated with the link
window.location.href = link;
});
});
});