title: Fade in and out transition for login box
body: <p>I want to make my login box fade in on page load and/or out on page exit if possible...
  I've tried looking at other stack overflow answers but none seem to work for my code</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;?php
      if(isset($_POST["submit"])) {
          $link = mysqli_connect("localhost","root","");
          mysqli_select_db($link,"test");
          $count = 0;
          $res=mysqli_query($link,"SELECT * FROM users WHERE username='$_POST[Username]' &amp;&amp; password='$_POST[Password]'");
          $count=mysqli_num_rows($res);
          if($count &gt; 0) {
              ?&gt;
              &lt;script type="text/javascript"&gt;
              window.location="index.php";
              &lt;/script&gt;
              &lt;?php
          }
      }
  ?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;link rel="stylesheet" type="text/css" href="stylesheet.css"&gt;
  &lt;link href="https://fonts.googleapis.com/css?family=PT+Sans" rel="stylesheet"&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id = "log"&gt;
          &lt;form autocomplete="off" method="post" action="login.php"&gt;
          &lt;p&gt;Username:&lt;/p&gt; &lt;input class="inputbox" type="text" name="Username" /&gt;
          &lt;p&gt;Password:&lt;/p&gt; &lt;input class="inputbox" type="password" name ="Password" /&gt;
          &lt;br&gt;&lt;br&gt;
          &lt;input id = "submitbutton" type="submit" name="submit" value="Login" /&gt;              &lt;br&gt;
      &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>thanks in advance</p>