<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="flex">
<div></div>
</div>
</body>
<button class="btn">ADD</button>
<style>
.flex{
display: flex;
flex-direction: column;
}
.flex div{
width: 250px;
background: mediumpurple;
filter: drop-shadow(0px 0px 4px mediumpurple);
height: 250px;
margin: 15px;
border-radius:3px;
}
.styles{
width: 250px;
background: mediumpurple;
filter: drop-shadow(0px 0px 4px mediumpurple);
height: 250px;
margin: 15px;
border-radius:3px;
}
</style>
<script>
let btn = document.querySelector('.btn')
let flex = document.querySelector(".flex")
btn.onclick = function(){
let div = document.createElement('div')
div.classList.add('styles')
$(div).hide(0)
flex.append(div)
$(div).show(400)
}
</script>
</html>