title: Transition CSS3 not working in Angular2?
body: <p>I am trying to add fullscreen navigation area, i already made it, but the transition is not working, but another CSS code is working, what i missed here? is there something i need to add in somewhere when using angular2?</p>
  
  <p>Here is my component folder looked like :
  <a href="https://i.stack.imgur.com/dG43o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dG43o.png" alt="enter image description here"></a></p>
  
  <p>below is my css file, navbar.component.css :</p>
  
  <pre><code>body {
      margin: 0;
      font-family: 'Lato', sans-serif;
  }
  
  .overlay {
      height: 100%;
      width: 100%;
      position: fixed;
      z-index: 1;
      top: 0;
      left: 0;
      background-color: rgb(0,0,0);
      background-color: rgba(0,0,0, 0.9);
      overflow-x: hidden;
      transition: 0.5s;
  }
  
  .overlay-content {
      position: relative;
      top: 25%;
      width: 100%;
      text-align: center;
      margin-top: 30px;
  }
  
  .overlay a {
      padding: 8px;
      text-decoration: none;
      font-size: 36px;
      color: #818181;
      display: block;
      transition: 0.3s;
  }
  
  .overlay a:hover, .overlay a:focus {
      color: #f1f1f1;
  }
  
  .overlay .closebtn {
      position: absolute;
      top: 20px;
      right: 45px;
      font-size: 60px;
  }
  
  @media screen and (max-height: 450px) {
    .overlay a {font-size: 20px}
    .overlay .closebtn {
      font-size: 40px;
      top: 15px;
      right: 35px;
    }
  }
  </code></pre>
  
  <p>below is my html file, navbar.component.html :</p>
  
  <pre><code>&lt;div id="myNav" class="overlay" *ngIf="displayNav"&gt;
    &lt;a href="javascript:void(0)" class="closebtn" (click)="closeNav()"&gt;&amp;times;&lt;/a&gt;
    &lt;div class="overlay-content"&gt;
      &lt;a href="#"&gt;About&lt;/a&gt;
      &lt;a href="#"&gt;Services&lt;/a&gt;
      &lt;a href="#"&gt;Clients&lt;/a&gt;
      &lt;a href="#"&gt;Contact&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  
  &lt;h2&gt;Fullscreen Overlay Nav Example&lt;/h2&gt;
  &lt;p&gt;Click on the element below to open the fullscreen overlay navigation menu.&lt;/p&gt;
  &lt;p&gt;In this example, the navigation menu will slide in, from left to right:&lt;/p&gt;
  &lt;span style="font-size:30px;cursor:pointer" (click)="openNav()"&gt;&amp;#9776; open&lt;/span&gt;
  </code></pre>
  
  <p>below is my typescript file, navbar.component.ts :</p>
  
  <pre><code>import { Component } from '@angular/core';
  
  @Component({
    moduleId: module.id,
    selector: 'app-navbar',
    templateUrl: 'navbar.component.html',
    styleUrls: ['navbar.component.css']
  })
  export class NavbarComponent {
  
    public displayNav: boolean = false;
  
    constructor() { }
  
    openNav(){
      this.displayNav = true;
      console.log(this.displayNav);
  
    }
  
    closeNav(){
      this.displayNav = false;
      console.log(this.displayNav);
    }
  }
  </code></pre>
  
  <p>when i click on &#9776; open it just show the div area with id="myNav" without transition, i already set the transition in class="overlay"</p>
  
  <pre><code>.overlay {
      height: 100%;
      width: 100%;
      position: fixed;
      z-index: 1;
      top: 0;
      left: 0;
      background-color: rgb(0,0,0);
      background-color: rgba(0,0,0, 0.9);
      overflow-x: hidden;
      transition: 0.5s;
  }
  </code></pre>
  
  <p>but i try the transition in usual html with javascript n css, it work, what do i missed here?</p>