margue animation added

This commit is contained in:
Burak Civan
2022-10-17 09:33:09 +03:00
parent 5ae875711e
commit 6e1ee934e9
4 changed files with 57 additions and 2 deletions

View File

@@ -357,3 +357,25 @@ if (navigator.userAgent.search("Firefox") >= 0) {
}
}
//Firefox show modal for icon set
document.querySelectorAll('[data-truncate]').forEach((truncate) => {
let truncateText = truncate.textContent.split(" ").join("");
truncate.addEventListener('mouseover', function () {
if (truncateText.length > 20) {
truncate.style.animationPlayState = 'running';
truncate.classList.add('animate-marquee');
if (truncate.classList.contains('truncate')) {
truncate.classList.remove('truncate');
}
}
});
truncate.addEventListener('mouseout', function () {
if (truncateText.length > 20) {
truncate.style.animationPlayState = 'paused';
truncate.classList.add('truncate');
}
});
});

28
public/css/app.css vendored
View File

@@ -10011,6 +10011,34 @@ input[type="date"]::-webkit-inner-spin-button,
-webkit-animation: submit_second 0.7s ease alternate infinite;
animation: submit_second 0.7s ease alternate infinite;
}
@-webkit-keyframes marquee{
0%{
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
100%{
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}
}
@keyframes marquee{
0%{
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
100%{
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}
}
.animate-marquee{
-webkit-animation: marquee 15s linear infinite;
animation: marquee 15s linear infinite;
}
.cursor-auto{
cursor: auto;
}