Равиль,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
.popup {
height: 0;
opacity: 0;
background-color: rgba(0,0,0,0.6);
transition: .5s, height 0s .5s;
}
.open__popup {
opacity: 1;
height: 700px;
transition: opacity .5s;
}
</style>
</head>
<body>
<div class="main">
<button class="main__button" type="button">Нажмите</button>
<div class="popup">
</div>
</div>
<script>
const popup = document.querySelector('.popup');
const mainButton = document.querySelector('.main__button');
function openPopup() {
popup.classList.toggle("open__popup");
}
mainButton.addEventListener("click", openPopup);
</script>
</body>
</html>