.hide:hover{//1 способ не работает
visibility: visible;
width: max-content;
height: max-content;
}
.item:hover .hide{
visibility: visible;
width: max-content;
height: max-content;
}
var newtext = document.createTextNode(text);
var p1 = document.getElementById("p1");
p1.appendChild(newtext);