HTML
<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>sample</title>
  </head>
  <style >
    body{
      background: black;
    }
    div{
      background : red;
      height: 200px;
      margin : 20px 100px;
      width : auto;
      display: none;
    }
    button{
      color: red;
      font-weight:bold;
      background : grey;
      padding : 5px 20px;
      font-size : 1rem;
    }
  </style>
  <body>
    <div id="myDIV">
    </div>
    <button type="button" onclick=myFunction() name="button">CLICK ME</button>
  </body>
  <script>
    function myFunction(){
      document.getElementById("myDIV").style.display = "block";
    }
  </script>
</html>
QUESTION 
As you can see, when i click the button, the div appear. But this i want the dev to appear in a smooth manner.  
I tried this solution but it did'nt work for me.
 
     
     
     
     
    