const items = document.querySelectorAll(".item");
items.forEach(item => {
const hiddenText = item.querySelector(".item__hidden_text");
item.addEventListener("mouseenter", () => {
hiddenText.animate([
{height: 0},
{height: `${hiddenText.scrollHeight}px`}
], {
fill: "forwards",
duration: 300,
});
});
item.addEventListener("mouseleave", () => {
hiddenText.animate([
{height: `${hiddenText.scrollHeight}px`},
{height: 0}
], {
fill: "forwards",
duration: 300,
});
});
});
Почему так?
Как вы знаете, чтобы нажать на ноутбуке любую клавишу от F1 до F12 нужно задерживать клавишу Fn