Можно добиться чтобы работала в Mozzila Firefox анимация фона с background-clip: text?
Пример на codepen https://codepen.io/fess901/pen/rNWyqbK
В Хроме работает нормально, фон показывается и анимируется внутри текста не выходя за его границы.
В Мозиле просто выставление фона внутри текста работает нормально, но при попытке его анимировать, как в моем случае изменить позиционирование фона, все ломается и исчезает обрезка по границе текста.
Есть ли возможность как то заставить работать мой пример в браузере Mozzila Firefox?
HTML
<div class="test-class" style="background-image: url(https://st.depositphotos.com/2420147/2656/i/600/depositphotos_26569863-stock-photo-abstract-black-background.jpg);">Lorem</div>
CSS
.test-class{
font-weight: 900;
font-size: 440px;
text-transform: uppercase;
text-align: center;
background-attachment: fixed;
background-repeat: no-repeat;
background-size: cover;
background-position: calc(50%) calc(50%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
-moz-text-fill-color: transparent;
text-fill-color: transparent;
pointer-events: none;
position: absolute;
bottom: -20px;
z-index: 1;
width: 100%;
-webkit-transition: 2s background-image;
transition: 2s background-image;
-webkit-animation-duration: 2s;
animation-duration: 2s;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-delay: .5s;
animation-delay: .5s;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-timing-function: linear;
animation-timing-function: linear;
-webkit-animation-name: text;
animation-name: text;
}
@keyframes text { 0% { background-position: calc(50%) calc(50%); } 100% { background-position: calc(50% - 40px) calc(50% + 60px); } }
Ответы (1 шт):
Автор решения: UModeL
→ Ссылка
.test-class {
position: absolute;
bottom: -20px;
z-index: 1;
min-width: 100%;
font-size: 440px;
font-weight: 900;
text-align: center;
text-transform: uppercase;
background-attachment: fixed;
background-repeat: repeat;
background-size: cover;
background-position: calc(50%) calc(50%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
text-fill-color: transparent;
pointer-events: none;
transition: 2s background-image;
animation: text 2s linear .5s forwards infinite;
}
@keyframes text {
0% { background-position: calc(50%) calc(50%); }
100% { background-position: calc(50% - 40px) calc(50% + 60px); }
}
<div class="test-class" style="background-image: url(https://st.depositphotos.com/2420147/2656/i/600/depositphotos_26569863-stock-photo-abstract-black-background.jpg);">Lorem</div>