I'm building a website to learn the interaction between CSS and HTML, but, I have a problem with this: "page with problem".
The div on the right would do a transition to the bottom and this translation must be a second long, but, it's a lot faster.
I don't understand the problem.
function setDescription(eventId) {
var curEv = getEventById(eventId);
var didascalia = document.getElementById("didascalia");
didascalia.firstChild.data = curEv.titolo;
var eventDescription = document.getElementById("eventDescription");
if (eventDescription.firstChild) eventDescription.firstChild.data = curEv.descrizione;
else eventDescription.appendChild(document.createTextNode(curEv.descrizione));
var image = document.getElementById("imageEventImmagine");
if (image) {
if (image.alt === curEv.tipologia) return;
image.src = "./resource/img/eventi/" + curEv.tipologia + ".jpg";
image.alt = curEv.tipologia;
} else {
var divImmagine = document.getElementById("divImmagine");
var img = document.createElement("img");
img.id = "imageEventImmagine";
img.src = "./resource/img/eventi/" + curEv.tipologia + ".jpg";
img.alt = curEv.tipologia;
divImmagine.appendChild(img);
}
}
.smalldesc {
overflow: hidden;
transition: all .10s ease;
}
.smalldesc.expand {
max-height: 100%;
}
<div id="expand" class="basePreventivo smalldesc">
<h3 id="didascalia">Seleziona un'evento</h3>
<p id="eventDescription"></p>
<div id="divImmagine" class="fill"></div>
</div>