JSFiddle - React, Tailwind, and code Playground
by Qwerty_Wasd
HTML
<button type="submit" id="pusk">Отправить</button>
<div class="text hide" >
<ul>
<li>картина</li>
<li>рамка</li>
</ul>
</div>
<div class="hide" id="call">---------</div>
CSS
#call {
opacity: 1;
transition: 1s;
}
.hide{
display: none;
}
JavaScript
var btn = document.getElementById('pusk');
var preloader = document.getElementById('call');
var text = document.querySelector('.text');
btn.addEventListener('click', function() {
preloader.classList.remove("hide");
preloader.style.opacity=0;
text.classList.remove("hide")
/* setTimeout(function() {
preloader.classList.add("hide");
}, 2000); */
});