JSFiddle - React, Tailwind, and code Playground
by littleguga
HTML
<body>
<div id="popup" class="pop-down">
<form>
<h3>Приветствие</h3>
<input />
<input />
<button> Отправить </button>
</form>
</div>
</body>
CSS
*{
box-sizing: border-box;
}
#popup{
padding-left: 10px;
background: yellow;
height: 500px;
width: 300px;
position: fixed;
right: 0;
border: 1px solid black;
transition: 3s all;
}
.pop-up{
bottom: 0 !important;
}
.pop-down{
bottom: -440px;
}
input{
margin: 15px;
margin-left: 50px;
}
JavaScript
flag = true;
$(function(){
$('#popup').click(function(){
$('#popup').toggleClass("pop-up");
});
});